[llvm-branch-commits] [llvm-branch] r227985 - Merging r227934:
Hans Wennborg
hans at hanshq.net
Tue Feb 3 09:26:33 PST 2015
Author: hans
Date: Tue Feb 3 11:26:33 2015
New Revision: 227985
URL: http://llvm.org/viewvc/llvm-project?rev=227985&view=rev
Log:
Merging r227934:
------------------------------------------------------------------------
r227934 | rafael | 2015-02-02 17:53:03 -0800 (Mon, 02 Feb 2015) | 1 line
Propagate a better error message to the C api.
------------------------------------------------------------------------
Modified:
llvm/branches/release_36/ (props changed)
llvm/branches/release_36/lib/Bitcode/Reader/BitReader.cpp
llvm/branches/release_36/test/Bindings/llvm-c/invalid-bitcode.test
Propchange: llvm/branches/release_36/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 3 11:26:33 2015
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226170-226171,226182,226473,226664,226708,226711,226755,227005,227085,227250,227260-227261,227290,227294,227299,227319,227339,227491,227584,227603,227670,227809,227903
+/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226170-226171,226182,226473,226664,226708,226711,226755,227005,227085,227250,227260-227261,227290,227294,227299,227319,227339,227491,227584,227603,227670,227809,227903,227934
Modified: llvm/branches/release_36/lib/Bitcode/Reader/BitReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/Bitcode/Reader/BitReader.cpp?rev=227985&r1=227984&r2=227985&view=diff
==============================================================================
--- llvm/branches/release_36/lib/Bitcode/Reader/BitReader.cpp (original)
+++ llvm/branches/release_36/lib/Bitcode/Reader/BitReader.cpp Tue Feb 3 11:26:33 2015
@@ -41,9 +41,11 @@ LLVMBool LLVMParseBitcodeInContext(LLVMC
ErrorOr<Module *> ModuleOrErr = parseBitcodeFile(
Buf, Ctx, [&](const DiagnosticInfo &DI) { DI.print(DP); });
- if (std::error_code EC = ModuleOrErr.getError()) {
- if (OutMessage)
- *OutMessage = strdup(EC.message().c_str());
+ if (ModuleOrErr.getError()) {
+ if (OutMessage) {
+ Stream.flush();
+ *OutMessage = strdup(Message.c_str());
+ }
*OutModule = wrap((Module*)nullptr);
return 1;
}
Modified: llvm/branches/release_36/test/Bindings/llvm-c/invalid-bitcode.test
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/test/Bindings/llvm-c/invalid-bitcode.test?rev=227985&r1=227984&r2=227985&view=diff
==============================================================================
--- llvm/branches/release_36/test/Bindings/llvm-c/invalid-bitcode.test (original)
+++ llvm/branches/release_36/test/Bindings/llvm-c/invalid-bitcode.test Tue Feb 3 11:26:33 2015
@@ -1,3 +1,3 @@
; RUN: not llvm-c-test --module-dump < %S/Inputs/invalid.ll.bc 2>&1 | FileCheck %s
-CHECK: Error parsing bitcode: Corrupted bitcode
+CHECK: Error parsing bitcode: Unknown attribute kind (48)
More information about the llvm-branch-commits
mailing list