summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2019-06-11 02:32:27 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2019-06-11 02:32:27 +0000
commite5bdedac9dc5ecb240a56dcb19e5fd923af6c353 (patch)
tree226ae5799cf45deecdfcf6178bfeef381f480389 /llvm/lib/DebugInfo
parenta2048f868dd2c7b642131005a4c031722de073d6 (diff)
downloadbcm5719-llvm-e5bdedac9dc5ecb240a56dcb19e5fd923af6c353.tar.gz
bcm5719-llvm-e5bdedac9dc5ecb240a56dcb19e5fd923af6c353.zip
Symbolize: Make DWPName a symbolizer option instead of an argument to symbolize{,Inlined}Code.
This makes the interface simpler and more consistent with the interface for .dSYM files and fixes a bug where llvm-symbolizer would not read the dwp if it was asked to symbolize data before symbolizing code. Differential Revision: https://reviews.llvm.org/D63114 llvm-svn: 363025
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r--llvm/lib/DebugInfo/Symbolize/Symbolize.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp b/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
index 00e4139c0ba..27632a10bad 100644
--- a/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
+++ b/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
@@ -53,10 +53,9 @@ namespace symbolize {
Expected<DILineInfo>
LLVMSymbolizer::symbolizeCode(const std::string &ModuleName,
- object::SectionedAddress ModuleOffset,
- StringRef DWPName) {
+ object::SectionedAddress ModuleOffset) {
SymbolizableModule *Info;
- if (auto InfoOrErr = getOrCreateModuleInfo(ModuleName, DWPName))
+ if (auto InfoOrErr = getOrCreateModuleInfo(ModuleName))
Info = InfoOrErr.get();
else
return InfoOrErr.takeError();
@@ -80,10 +79,9 @@ LLVMSymbolizer::symbolizeCode(const std::string &ModuleName,
Expected<DIInliningInfo>
LLVMSymbolizer::symbolizeInlinedCode(const std::string &ModuleName,
- object::SectionedAddress ModuleOffset,
- StringRef DWPName) {
+ object::SectionedAddress ModuleOffset) {
SymbolizableModule *Info;
- if (auto InfoOrErr = getOrCreateModuleInfo(ModuleName, DWPName))
+ if (auto InfoOrErr = getOrCreateModuleInfo(ModuleName))
Info = InfoOrErr.get();
else
return InfoOrErr.takeError();
@@ -378,8 +376,7 @@ LLVMSymbolizer::getOrCreateObject(const std::string &Path,
}
Expected<SymbolizableModule *>
-LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName,
- StringRef DWPName) {
+LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) {
const auto &I = Modules.find(ModuleName);
if (I != Modules.end()) {
return I->second.get();
@@ -425,8 +422,9 @@ LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName,
}
}
if (!Context)
- Context = DWARFContext::create(*Objects.second, nullptr,
- DWARFContext::defaultErrorHandler, DWPName);
+ Context =
+ DWARFContext::create(*Objects.second, nullptr,
+ DWARFContext::defaultErrorHandler, Opts.DWPName);
assert(Context);
auto InfoOrErr =
SymbolizableObjectFile::create(Objects.first, std::move(Context));
OpenPOWER on IntegriCloud