[llvm-commits] [llvm] r144184 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Benjamin Kramer
benny.kra at googlemail.com
Wed Nov 9 04:12:04 PST 2011
Author: d0k
Date: Wed Nov 9 06:12:04 2011
New Revision: 144184
URL: http://llvm.org/viewvc/llvm-project?rev=144184&view=rev
Log:
Take advantage of the zero byte in StringMap when emitting dwarf stringpool entries.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=144184&r1=144183&r2=144184&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Nov 9 06:12:04 2011
@@ -1937,8 +1937,9 @@
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*/);
}
}
More information about the llvm-commits
mailing list