diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-11-09 12:12:04 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-11-09 12:12:04 +0000 |
commit | 0c45f7d1a7a158e94817b21b9cca5456414a4760 (patch) | |
tree | b44adba7fb0601c51c9a3788031cbc18fce418ed /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 6f274a5e81b028baa7290dd5645e8796850e8c7a (diff) | |
download | external_llvm-0c45f7d1a7a158e94817b21b9cca5456414a4760.zip external_llvm-0c45f7d1a7a158e94817b21b9cca5456414a4760.tar.gz external_llvm-0c45f7d1a7a158e94817b21b9cca5456414a4760.tar.bz2 |
Take advantage of the zero byte in StringMap when emitting dwarf stringpool entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144184 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index be7d18a..7015555 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1937,8 +1937,9 @@ void DwarfDebug::emitDebugStr() { Asm->OutStreamer.EmitLabel(Entries[i].second->getValue().first); // Emit the string itself. - Asm->OutStreamer.EmitBytes(Entries[i].second->getKey(), 0/*addrspace*/); - Asm->OutStreamer.EmitZeros(1, 0); + Asm->OutStreamer.EmitBytes(StringRef(Entries[i].second->getKeyData(), + Entries[i].second->getKeyLength()+1), + 0/*addrspace*/); } } |