summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/MachObjectWriter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp
index d7934ad80c6..8ce6127e386 100644
--- a/llvm/lib/MC/MachObjectWriter.cpp
+++ b/llvm/lib/MC/MachObjectWriter.cpp
@@ -565,8 +565,7 @@ void MachObjectWriter::computeSymbolTable(
MachSymbolData MSD;
MSD.Symbol = &Symbol;
- StringRef Name = Symbol.getName();
- MSD.StringIndex = Name.empty() ? 0 : StringTable.getOffset(Name);
+ MSD.StringIndex = StringTable.getOffset(Symbol.getName());
if (Symbol.isAbsolute()) {
MSD.SectionIndex = 0;
OpenPOWER on IntegriCloud