NULL terminate name in pubtypes sections.

llvm-svn: 95062
This commit is contained in:
Devang Patel 2010-02-02 03:37:03 +00:00
parent 15217531f7
commit 6d404adc1b
1 changed files with 1 additions and 1 deletions

View File

@ -2800,7 +2800,7 @@ void DwarfDebug::emitDebugPubTypes() {
Asm->EmitInt32(Entity->getOffset()); EOL("DIE offset");
if (Asm->VerboseAsm) Asm->OutStreamer.AddComment("External Name");
Asm->OutStreamer.EmitBytes(StringRef(Name, strlen(Name)), 0);
Asm->OutStreamer.EmitBytes(StringRef(Name, GI->getKeyLength()+1), 0);
}
Asm->EmitInt32(0); EOL("End Mark");