diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2017-10-31 16:39:47 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2017-10-31 16:39:47 +0000 |
| commit | 05c988473f508a1c37ab739898ed95b5456c47cf (patch) | |
| tree | fef61bd62f8979b3a734b70f576483b9b2cd8ba4 /llvm/test/tools | |
| parent | c212cc88e2b61d197d9a60acbc116c52d3555101 (diff) | |
| download | bcm5719-llvm-05c988473f508a1c37ab739898ed95b5456c47cf.tar.gz bcm5719-llvm-05c988473f508a1c37ab739898ed95b5456c47cf.zip | |
LTOModule::isBitcodeFile() shouldn't assert when returning false.
Fixes a bunch of assert-on-invalid-bitcode regressions after 315483.
Expected<> calls assertIsChecked() in its dtor, and operator bool() only calls
setChecked() if there's no error. So for functions that don't return an error
itself, the Expected<> version needs explicit code to disarm the error that the
ErrorOr<> code didn't need.
https://reviews.llvm.org/D39437
llvm-svn: 317010
Diffstat (limited to 'llvm/test/tools')
| -rw-r--r-- | llvm/test/tools/lto/no-bitcode.s | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/test/tools/lto/no-bitcode.s b/llvm/test/tools/lto/no-bitcode.s new file mode 100644 index 00000000000..360ebf1e998 --- /dev/null +++ b/llvm/test/tools/lto/no-bitcode.s @@ -0,0 +1,4 @@ +; libLTO.dylib shouldn't assert on invalid inputs. +; RUN: llvm-mc -triple=arm64-apple-ios7.0.0 -filetype=obj -o %t.o +; RUN: llvm-ar r %t.a %t.o +; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O0 -o %t.dylib %t.a |

