aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-07-22 23:07:52 +0000
committerLang Hames <lhames@gmail.com>2014-07-22 23:07:52 +0000
commitcce313b082f0fd609d10ca4f4bf7f3fe1b8a70a0 (patch)
tree628dbc27fb637bf3e325b2694708d9c803f32a8c /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
parentb78ad899e5012a12b01610c0313ca8006bded1da (diff)
downloadllvm-cce313b082f0fd609d10ca4f4bf7f3fe1b8a70a0.zip
llvm-cce313b082f0fd609d10ca4f4bf7f3fe1b8a70a0.tar.gz
llvm-cce313b082f0fd609d10ca4f4bf7f3fe1b8a70a0.tar.bz2
[MCJIT] Improve stub_addr file-not-found diagnostic to help track down a
buildbot failure. llvm-svn: 213701
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
index 3ac4dd6..72075f5 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
@@ -713,8 +713,23 @@ std::pair<uint64_t, std::string> RuntimeDyldCheckerImpl::getStubAddrFor(
bool IsInsideLoad) const {
auto SI1 = Stubs.find(FileName);
- if (SI1 == Stubs.end())
- return std::make_pair(0, ("File '" + FileName + "' not found.\n").str());
+ if (SI1 == Stubs.end()) {
+ std::string ErrorMsg = "File '";
+ ErrorMsg += FileName;
+ ErrorMsg += "' not found. ";
+ if (Stubs.empty())
+ ErrorMsg += "No stubs registered.";
+ else {
+ ErrorMsg += "Available files are:";
+ for (const auto& StubEntry : Stubs) {
+ ErrorMsg += " '";
+ ErrorMsg += StubEntry.first;
+ ErrorMsg += "'";
+ }
+ }
+ ErrorMsg += "\n";
+ return std::make_pair(0, ErrorMsg);
+ }
const SectionStubMap &SectionStubs = SI1->second;
auto SI2 = SectionStubs.find(SectionName);