mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-17 05:13:14 +01:00
Fix new signature of verifyModule() in LLVM 3.5.
This commit is contained in:
@@ -359,12 +359,17 @@ bool ldc_optimize_module(llvm::Module* m)
|
||||
// Verifies the module.
|
||||
void verifyModule(llvm::Module* m) {
|
||||
if (!noVerify) {
|
||||
std::string verifyErr;
|
||||
Logger::println("Verifying module...");
|
||||
LOG_SCOPE;
|
||||
if (llvm::verifyModule(*m, llvm::ReturnStatusAction, &verifyErr))
|
||||
std::string ErrorStr;
|
||||
#if LDC_LLVM_VER >= 305
|
||||
raw_string_ostream OS(ErrorStr);
|
||||
if (llvm::verifyModule(*m, &OS))
|
||||
#else
|
||||
if (llvm::verifyModule(*m, llvm::ReturnStatusAction, &ErrorStr))
|
||||
#endif
|
||||
{
|
||||
error("%s", verifyErr.c_str());
|
||||
error("%s", ErrorStr.c_str());
|
||||
fatal();
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user