[llvm-commits] [llvm] r144194 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Benjamin Kramer
benny.kra at googlemail.com
Wed Nov 9 10:16:11 PST 2011
Author: d0k
Date: Wed Nov 9 12:16:11 2011
New Revision: 144194
URL: http://llvm.org/viewvc/llvm-project?rev=144194&view=rev
Log:
Add comments.
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=144194&r1=144193&r2=144194&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Nov 9 12:16:11 2011
@@ -1901,6 +1901,7 @@
Asm->EmitInt32(Entity->getOffset());
if (Asm->isVerbose()) Asm->OutStreamer.AddComment("External Name");
+ // Emit the name with a terminating null byte.
Asm->OutStreamer.EmitBytes(StringRef(Name, GI->getKeyLength()+1), 0);
}
@@ -1936,7 +1937,7 @@
// Emit a label for reference from debug information entries.
Asm->OutStreamer.EmitLabel(Entries[i].second->getValue().first);
- // Emit the string itself.
+ // Emit the string itself with a terminating null byte.
Asm->OutStreamer.EmitBytes(StringRef(Entries[i].second->getKeyData(),
Entries[i].second->getKeyLength()+1),
0/*addrspace*/);
More information about the llvm-commits
mailing list