summaryrefslogtreecommitdiff
path: root/tools/llvm-readobj/ELFDumper.cpp
diff options
context:
space:
mode:
authorNico Rieck <nico.rieck@gmail.com>2013-04-22 08:34:46 +0000
committerNico Rieck <nico.rieck@gmail.com>2013-04-22 08:34:46 +0000
commit48831939a83915939f759bdbe95404499169bc85 (patch)
tree4c33a29810aacc0378d102edbf60cb7f26507e6e /tools/llvm-readobj/ELFDumper.cpp
parentd9e70873f38e734f37ed8b7ce75839b25e3eada5 (diff)
llvm-readobj: Do not print NULL StringRefs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-readobj/ELFDumper.cpp')
-rw-r--r--tools/llvm-readobj/ELFDumper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp
index 3757b09c394..f771cbdd52b 100644
--- a/tools/llvm-readobj/ELFDumper.cpp
+++ b/tools/llvm-readobj/ELFDumper.cpp
@@ -643,9 +643,9 @@ void ELFDumper<ELFT>::printSymbol(symbol_iterator SymI, bool IsDynamic) {
if (SymI->getName(SymbolName))
SymbolName = "";
- StringRef SectionName;
- if (Section && Obj->getSectionName(Section, SectionName))
- SectionName = "";
+ StringRef SectionName = "";
+ if (Section)
+ Obj->getSectionName(Section, SectionName);
std::string FullSymbolName(SymbolName);
if (IsDynamic) {