diff options
| author | David Blaikie <dblaikie@gmail.com> | 2013-09-20 00:33:15 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2013-09-20 00:33:15 +0000 |
| commit | efd0bcb70f102117b04f39e156140974dfa9063c (patch) | |
| tree | 0793710760b427d0c8020e026469a9c8536f6854 /llvm/lib/CodeGen/AsmPrinter | |
| parent | 9d117ab7ef43ca94ff4b8fda523e2b8db3aede81 (diff) | |
| download | bcm5719-llvm-efd0bcb70f102117b04f39e156140974dfa9063c.tar.gz bcm5719-llvm-efd0bcb70f102117b04f39e156140974dfa9063c.zip | |
DebugInfo: GDBIndexEntry*String conversion functions now return const char* for easy llvm::formating
This was previously invoking UB by passing a user-defined type to
format. Thanks to Jordan Rose for pointing this out.
llvm-svn: 191060
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index f45e2f24310..76d63c722b3 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2426,7 +2426,7 @@ void DwarfDebug::emitDebugPubNames(bool GnuStyle) { if (GnuStyle) { dwarf::PubIndexEntryDescriptor Desc = computeIndexValue(TheCU, Entity); Asm->OutStreamer.AddComment( - "Kind: " + dwarf::GDBIndexEntryKindString(Desc.Kind) + ", " + + Twine("Kind: ") + dwarf::GDBIndexEntryKindString(Desc.Kind) + ", " + dwarf::GDBIndexEntryLinkageString(Desc.Linkage)); Asm->EmitInt8(Desc.toBits()); } @@ -2488,7 +2488,7 @@ void DwarfDebug::emitDebugPubTypes(bool GnuStyle) { if (GnuStyle) { dwarf::PubIndexEntryDescriptor Desc = computeIndexValue(TheCU, Entity); Asm->OutStreamer.AddComment( - "Kind: " + dwarf::GDBIndexEntryKindString(Desc.Kind) + ", " + + Twine("Kind: ") + dwarf::GDBIndexEntryKindString(Desc.Kind) + ", " + dwarf::GDBIndexEntryLinkageString(Desc.Linkage)); Asm->EmitInt8(Desc.toBits()); } |

