From 35522001faa829308aa9aec5601c1a1ab5fb290c Mon Sep 17 00:00:00 2001 From: Pete Cooper Date: Wed, 20 May 2015 19:50:03 +0000 Subject: Add bool to DebugLocDwarfExpression to control emitting comments. DebugLocDwarfExpression::EmitOp was creating temporary strings by concatenating Twine's. When emitting to object files, these comments are thrown away. This commit adds a boolean to the constructor of the DwarfExpression to control whether it will actually emit any comments. This prevents it from even generating the temporary comments which would have been thrown away anyway. llvm-svn: 237827 --- llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp index 6f48767c1df..61e74260454 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp @@ -185,7 +185,8 @@ void AsmPrinter::emitSectionOffset(const MCSymbol *Label) const { void AsmPrinter::EmitDwarfRegOp(ByteStreamer &Streamer, const MachineLocation &MLoc) const { DebugLocDwarfExpression Expr(*MF->getSubtarget().getRegisterInfo(), - getDwarfDebug()->getDwarfVersion(), Streamer); + getDwarfDebug()->getDwarfVersion(), + OutStreamer->hasRawTextSupport(), Streamer); const MCRegisterInfo *MRI = MMI->getContext().getRegisterInfo(); int Reg = MRI->getDwarfRegNum(MLoc.getReg(), false); if (Reg < 0) { -- cgit v1.2.3