diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-11-09 18:16:11 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-11-09 18:16:11 +0000 |
commit | 983c4578b0e84eb3b4ae319b49a8079c5cd322c6 (patch) | |
tree | 59e9d69784a7a6fb31157b1500d89022241198e3 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | ef0b3ca3a8935b5390633dc7bb4adcdb99e0c26a (diff) | |
download | external_llvm-983c4578b0e84eb3b4ae319b49a8079c5cd322c6.zip external_llvm-983c4578b0e84eb3b4ae319b49a8079c5cd322c6.tar.gz external_llvm-983c4578b0e84eb3b4ae319b49a8079c5cd322c6.tar.bz2 |
Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144194 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 7015555..edd4e45 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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*/); |