summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-rtdyld
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-08-05 20:51:46 +0000
committerLang Hames <lhames@gmail.com>2014-08-05 20:51:46 +0000
commitae17268a7edf9e3879351b7bbd9a7924e3aeac5f (patch)
tree79b2183ff563caeadf6a9adc499b2d288a5b311d /llvm/tools/llvm-rtdyld
parent822434da9fea0f5c5e95d84bb747893a06fcbff1 (diff)
downloadbcm5719-llvm-ae17268a7edf9e3879351b7bbd9a7924e3aeac5f.tar.gz
bcm5719-llvm-ae17268a7edf9e3879351b7bbd9a7924e3aeac5f.zip
[MCJIT] Make llvm-rtdyld check RuntimeDyld's error state when running in -verify
mode. This will cause -verify mode to report failure when RuntimeDyld encounters an internal error (e.g. overflows in relocation computations). Previously we had let these errors slip past unreported. llvm-svn: 214925
Diffstat (limited to 'llvm/tools/llvm-rtdyld')
-rw-r--r--llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp b/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
index 9de4d9e0a7d..f626a56cbb1 100644
--- a/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
+++ b/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
@@ -439,7 +439,14 @@ static int linkAndVerify() {
// Resolve all the relocations we can.
Dyld.resolveRelocations();
- return checkAllExpressions(Checker);
+ int ErrorCode = checkAllExpressions(Checker);
+ if (Dyld.hasError()) {
+ errs() << "RTDyld reported an error applying relocations:\n "
+ << Dyld.getErrorString() << "\n";
+ ErrorCode = 1;
+ }
+
+ return ErrorCode;
}
int main(int argc, char **argv) {
OpenPOWER on IntegriCloud