diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-02-29 22:28:22 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-02-29 22:28:22 +0000 |
commit | dba58fbdd9ddb656f23aa8d8b6e86d4747991063 (patch) | |
tree | 0661d197ca6815d78476c7a51b528727c2d962b4 /llvm/lib/CodeGen/AsmPrinter | |
parent | a349714bf9cd61b0d3aa0254891a0674c974113f (diff) | |
download | bcm5719-llvm-dba58fbdd9ddb656f23aa8d8b6e86d4747991063.tar.gz bcm5719-llvm-dba58fbdd9ddb656f23aa8d8b6e86d4747991063.zip |
Improve the debug output of DwarfDebug::buildLocationList().
llvm-svn: 262265
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h | 14 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h index b60ab9151ef..b09708159a1 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h +++ b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h @@ -76,6 +76,20 @@ public: const DIExpression *getExpression() const { return Expression; } friend bool operator==(const Value &, const Value &); friend bool operator<(const Value &, const Value &); + void dump() const { + if (isLocation()) { + llvm::dbgs() << "Loc = { reg=" << Loc.getReg() << " "; + if (Loc.isIndirect()) + llvm::dbgs() << '+' << Loc.getOffset(); + llvm::dbgs() << "} "; + } + else if (isConstantInt()) + Constant.CIP->dump(); + else if (isConstantFP()) + Constant.CFP->dump(); + if (Expression) + Expression->dump(); + } }; private: diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 87e886662f9..d4d94cabe83 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -916,7 +916,7 @@ DwarfDebug::buildLocationList(SmallVectorImpl<DebugLocEntry> &DebugLoc, DEBUG({ dbgs() << CurEntry->getValues().size() << " Values:\n"; for (auto &Value : CurEntry->getValues()) - Value.getExpression()->dump(); + Value.dump(); dbgs() << "-----\n"; }); |