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
This commit is contained in:
Benjamin Kramer 2011-11-09 12:12:04 +00:00
parent 6f274a5e81
commit 0c45f7d1a7

View File

@ -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*/);
}
}