Actually assign the string correctly through the std::string pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8704 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bytecode/Reader/ReaderWrappers.cpp b/lib/Bytecode/Reader/ReaderWrappers.cpp
index a5cc1c9..2203f53 100644
--- a/lib/Bytecode/Reader/ReaderWrappers.cpp
+++ b/lib/Bytecode/Reader/ReaderWrappers.cpp
@@ -174,7 +174,7 @@
M = AMP->releaseModule();
delete AMP;
} catch (std::string &err) {
- if (ErrorStr) ErrorStr = err;
+ if (ErrorStr) *ErrorStr = err;
return 0;
}
return M;
@@ -199,7 +199,7 @@
M = AMP->releaseModule();
delete AMP;
} catch (std::string &err) {
- if (ErrorStr) ErrorStr = err;
+ if (ErrorStr) *ErrorStr = err;
return 0;
}
return M;