Skip to content

Commit 5f27897

Browse files
committed
Fix mingw build
operation_not_supported doesn't seem to be available on at least some mingw versions. Make use of LLVM's errc interoperability header instead.
1 parent 07adcbc commit 5f27897

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/IPO/FunctionImport.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "llvm/Support/Casting.h"
4040
#include "llvm/Support/CommandLine.h"
4141
#include "llvm/Support/Debug.h"
42+
#include "llvm/Support/Errc.h"
4243
#include "llvm/Support/Error.h"
4344
#include "llvm/Support/ErrorHandling.h"
4445
#include "llvm/Support/FileSystem.h"
@@ -496,7 +497,7 @@ static void computeImportForFunction(
496497
VI.name().str() + " due to " +
497498
getFailureName(Reason);
498499
auto Error = make_error<StringError>(
499-
Msg, std::make_error_code(std::errc::operation_not_supported));
500+
Msg, make_error_code(errc::not_supported));
500501
logAllUnhandledErrors(std::move(Error), errs(),
501502
"Error importing module: ");
502503
break;

0 commit comments

Comments
 (0)