summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-05-20 19:50:03 +0000
committerPete Cooper <peter_cooper@apple.com>2015-05-20 19:50:03 +0000
commit35522001faa829308aa9aec5601c1a1ab5fb290c (patch)
tree8a67a99e404a9090c37e90a3c3a0927cc80c925c /llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
parente8fb3a220a91db6fd5e9214375540f7ea0bb3a67 (diff)
downloadbcm5719-llvm-35522001faa829308aa9aec5601c1a1ab5fb290c.tar.gz
bcm5719-llvm-35522001faa829308aa9aec5601c1a1ab5fb290c.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp3
1 files changed, 2 insertions, 1 deletions
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) {
OpenPOWER on IntegriCloud