OSDN Git Service

Add bool to DebugLocDwarfExpression to control emitting comments.
authorPete Cooper <peter_cooper@apple.com>
Wed, 20 May 2015 19:50:03 +0000 (19:50 +0000)
committerPete Cooper <peter_cooper@apple.com>
Wed, 20 May 2015 19:50:03 +0000 (19:50 +0000)
commitc212d49d750f28009a61508be14517b45e7527db
tree25fa219f3558c11e56ed2fd7555a0c53bb3ea9fc
parent96273f6cbefccb734c442cdb02344bbc13c12aec
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237827 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfExpression.h
lib/CodeGen/AsmPrinter/DwarfUnit.cpp