diff options
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
| -rw-r--r-- | src/rustllvm/PassWrapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index 32bac73debf..021dda49765 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -75,7 +75,7 @@ LLVMRustCreateTargetMachine(const char *triple, const llvm::Target *TheTarget = TargetRegistry::lookupTarget(Trip.getTriple(), Error); if (TheTarget == NULL) { - LLVMRustError = Error.c_str(); + LLVMRustSetLastError(Error.c_str()); return NULL; } @@ -178,7 +178,7 @@ LLVMRustWriteOutputFile(LLVMTargetMachineRef Target, raw_fd_ostream OS(path, ErrorInfo, raw_fd_ostream::F_Binary); #endif if (ErrorInfo != "") { - LLVMRustError = ErrorInfo.c_str(); + LLVMRustSetLastError(ErrorInfo.c_str()); return false; } formatted_raw_ostream FOS(OS); |
