mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Don't generate comments in the DebugLocStream unless required. NFC.
The ByteStreamer here wasn't taking account of whether the asm streamer was text based and verbose. Only with that combination should we emit comments. This change makes sure that we only actually convert a Twine to a string using Twine::str() if we need the comment. This saves about 10000 small allocations on a test case involving the verify-use_list-order bitcode going through llc with debug info. Note, this is NFC as the comments would ultimately never be emitted unless required. Reviewed by Duncan Exon Smith and David Blaikie. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237851 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -192,8 +192,8 @@ static LLVM_CONSTEXPR DwarfAccelTable::Atom TypeAtoms[] = {
|
||||
DwarfAccelTable::Atom(dwarf::DW_ATOM_type_flags, dwarf::DW_FORM_data1)};
|
||||
|
||||
DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
|
||||
: Asm(A), MMI(Asm->MMI), PrevLabel(nullptr),
|
||||
InfoHolder(A, "info_string", DIEValueAllocator),
|
||||
: Asm(A), MMI(Asm->MMI), DebugLocs(A->OutStreamer->isVerboseAsm()),
|
||||
PrevLabel(nullptr), InfoHolder(A, "info_string", DIEValueAllocator),
|
||||
UsedNonDefaultText(false),
|
||||
SkeletonHolder(A, "skel_string", DIEValueAllocator),
|
||||
IsDarwin(Triple(A->getTargetTriple()).isOSDarwin()),
|
||||
|
Reference in New Issue
Block a user