summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-11-09 18:16:11 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-11-09 18:16:11 +0000
commit966ed1b6987a1b235b49b68f9d029cc05658c092 (patch)
tree51a518ed44dcaa72485828714fad44255dbb9b1e /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent02aa9fe2bd0d210e80c6e9128f66619768cecddf (diff)
downloadbcm5719-llvm-966ed1b6987a1b235b49b68f9d029cc05658c092.tar.gz
bcm5719-llvm-966ed1b6987a1b235b49b68f9d029cc05658c092.zip
Add comments.
llvm-svn: 144194
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 7015555d0e4..edd4e45a8f8 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1901,6 +1901,7 @@ void DwarfDebug::emitDebugPubTypes() {
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 @@ void DwarfDebug::emitDebugStr() {
// 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*/);
OpenPOWER on IntegriCloud