Fix for llvm revision 216393
This commit is contained in:
11
module.cpp
11
module.cpp
@@ -1088,9 +1088,20 @@ Module::writeObjectFileOrAssembly(llvm::TargetMachine *targetMachine,
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(LLVM_3_2) || defined(LLVM_3_3) || defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||
std::string error;
|
||||
#else // LLVM 3.6+
|
||||
std::error_code error;
|
||||
#endif
|
||||
|
||||
llvm::tool_output_file *of = new llvm::tool_output_file(outFileName, error, flags);
|
||||
|
||||
#if defined(LLVM_3_2) || defined(LLVM_3_3) || defined(LLVM_3_4) || defined(LLVM_3_5)
|
||||
if (error.size()) {
|
||||
#else // LLVM 3.6+
|
||||
if (error) {
|
||||
#endif
|
||||
|
||||
fprintf(stderr, "Error opening output file \"%s\".\n", outFileName);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user