[llvm] r237849 - Revert "Add bool to DebugLocDwarfExpression to control emitting comments."
Pete Cooper
peter_cooper at apple.com
Wed May 20 15:37:48 PDT 2015
Author: pete
Date: Wed May 20 17:37:48 2015
New Revision: 237849
URL: http://llvm.org/viewvc/llvm-project?rev=237849&view=rev
Log:
Revert "Add bool to DebugLocDwarfExpression to control emitting comments."
This reverts commit 0037b6bcbc874aa1b93d7ce3ad8dba3753ee2d9d (r237827).
David Blaikie suggested some alternatives to this which are better. Reverting to apply a better solution later.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp?rev=237849&r1=237848&r2=237849&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Wed May 20 17:37:48 2015
@@ -185,8 +185,7 @@ void AsmPrinter::emitSectionOffset(const
void AsmPrinter::EmitDwarfRegOp(ByteStreamer &Streamer,
const MachineLocation &MLoc) const {
DebugLocDwarfExpression Expr(*MF->getSubtarget().getRegisterInfo(),
- getDwarfDebug()->getDwarfVersion(),
- OutStreamer->hasRawTextSupport(), Streamer);
+ getDwarfDebug()->getDwarfVersion(), Streamer);
const MCRegisterInfo *MRI = MMI->getContext().getRegisterInfo();
int Reg = MRI->getDwarfRegNum(MLoc.getReg(), false);
if (Reg < 0) {
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=237849&r1=237848&r2=237849&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed May 20 17:37:48 2015
@@ -108,8 +108,6 @@ static const char *const DWARFGroupName
static const char *const DbgTimerName = "DWARF Debug Writer";
void DebugLocDwarfExpression::EmitOp(uint8_t Op, const char *Comment) {
- if (!PrintComments)
- return BS.EmitInt8(Op, Twine());
BS.EmitInt8(
Op, Comment ? Twine(Comment) + " " + dwarf::OperationEncodingString(Op)
: dwarf::OperationEncodingString(Op));
@@ -1479,7 +1477,6 @@ static void emitDebugLocValue(const AsmP
unsigned PieceOffsetInBits) {
DebugLocDwarfExpression DwarfExpr(*AP.MF->getSubtarget().getRegisterInfo(),
AP.getDwarfDebug()->getDwarfVersion(),
- AP.OutStreamer->hasRawTextSupport(),
Streamer);
// Regular entry.
if (Value.isInt()) {
@@ -1533,7 +1530,6 @@ void DebugLocEntry::finalize(const AsmPr
// The DWARF spec seriously mandates pieces with no locations for gaps.
DebugLocDwarfExpression Expr(*AP.MF->getSubtarget().getRegisterInfo(),
AP.getDwarfDebug()->getDwarfVersion(),
- AP.OutStreamer->hasRawTextSupport(),
Streamer);
Expr.AddOpPiece(PieceOffset-Offset, 0);
Offset += PieceOffset-Offset;
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.h?rev=237849&r1=237848&r2=237849&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.h Wed May 20 17:37:48 2015
@@ -34,15 +34,10 @@ protected:
const TargetRegisterInfo &TRI;
unsigned DwarfVersion;
- /// \brief Set to true if we want comments to be emitted. This is usually
- /// only the case when the AsmPrinter is emitting to a text stream with
- /// comments enabled.
- bool PrintComments;
-
public:
DwarfExpression(const TargetRegisterInfo &TRI,
- unsigned DwarfVersion, bool PrintComments)
- : TRI(TRI), DwarfVersion(DwarfVersion), PrintComments(PrintComments) {}
+ unsigned DwarfVersion)
+ : TRI(TRI), DwarfVersion(DwarfVersion) {}
virtual ~DwarfExpression() {}
/// Output a dwarf operand and an optional assembler comment.
@@ -114,9 +109,8 @@ class DebugLocDwarfExpression : public D
public:
DebugLocDwarfExpression(const TargetRegisterInfo &TRI,
- unsigned DwarfVersion, bool PrintComments,
- ByteStreamer &BS)
- : DwarfExpression(TRI, DwarfVersion, PrintComments), BS(BS) {}
+ unsigned DwarfVersion, ByteStreamer &BS)
+ : DwarfExpression(TRI, DwarfVersion), BS(BS) {}
void EmitOp(uint8_t Op, const char *Comment = nullptr) override;
void EmitSigned(int64_t Value) override;
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=237849&r1=237848&r2=237849&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Wed May 20 17:37:48 2015
@@ -47,7 +47,7 @@ GenerateDwarfTypeUnits("generate-type-un
DIEDwarfExpression::DIEDwarfExpression(const AsmPrinter &AP, DwarfUnit &DU,
DIELoc &DIE)
: DwarfExpression(*AP.MF->getSubtarget().getRegisterInfo(),
- AP.getDwarfDebug()->getDwarfVersion(), false),
+ AP.getDwarfDebug()->getDwarfVersion()),
AP(AP), DU(DU), DIE(DIE) {}
void DIEDwarfExpression::EmitOp(uint8_t Op, const char* Comment) {
More information about the llvm-commits
mailing list