summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-17 16:36:10 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-17 16:36:10 +0000
commitc0f7dd72b7a4e6434696ce576d4820056ae41b52 (patch)
tree0ed21689460e6d5f2b5b4bc3c348136bae6f913e /llvm/lib
parent546c8be9678a0b7c1a5197d4f695ec70e88424b6 (diff)
downloadbcm5719-llvm-c0f7dd72b7a4e6434696ce576d4820056ae41b52.tar.gz
bcm5719-llvm-c0f7dd72b7a4e6434696ce576d4820056ae41b52.zip
AsmPrinter: Store MDExpression directly instead of MDNode, NFC
Clean up `DebugLocEntry::Value::Expression`'s type while I'm messing around in here anyway. llvm-svn: 235203
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h16
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
2 files changed, 8 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
index 184fb295784..cd3584ecb57 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
@@ -17,7 +17,7 @@
namespace llvm {
class AsmPrinter;
-class MDNode;
+
/// \brief This struct describes location entries emitted in the .debug_loc
/// section.
class DebugLocEntry {
@@ -28,25 +28,25 @@ class DebugLocEntry {
public:
/// \brief A single location or constant.
struct Value {
- Value(const MDNode *Expr, int64_t i)
+ Value(const MDExpression *Expr, int64_t i)
: Expression(Expr), EntryKind(E_Integer) {
Constant.Int = i;
}
- Value(const MDNode *Expr, const ConstantFP *CFP)
+ Value(const MDExpression *Expr, const ConstantFP *CFP)
: Expression(Expr), EntryKind(E_ConstantFP) {
Constant.CFP = CFP;
}
- Value(const MDNode *Expr, const ConstantInt *CIP)
+ Value(const MDExpression *Expr, const ConstantInt *CIP)
: Expression(Expr), EntryKind(E_ConstantInt) {
Constant.CIP = CIP;
}
- Value(const MDNode *Expr, MachineLocation Loc)
+ Value(const MDExpression *Expr, MachineLocation Loc)
: Expression(Expr), EntryKind(E_Location), Loc(Loc) {
assert(cast<MDExpression>(Expr)->isValid());
}
/// Any complex address location expression for this Value.
- const MDNode *Expression;
+ const MDExpression *Expression;
/// Type of entry that this represents.
enum EntryType { E_Location, E_Integer, E_ConstantFP, E_ConstantInt };
@@ -71,9 +71,7 @@ public:
const ConstantInt *getConstantInt() const { return Constant.CIP; }
MachineLocation getLoc() const { return Loc; }
bool isBitPiece() const { return getExpression()->isBitPiece(); }
- DIExpression getExpression() const {
- return cast_or_null<MDExpression>(Expression);
- }
+ DIExpression getExpression() const { return Expression; }
friend bool operator==(const Value &, const Value &);
friend bool operator<(const Value &, const Value &);
};
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 7c13f1384aa..e53f5743231 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -733,7 +733,7 @@ void DwarfDebug::collectVariableInfoFromMMITable(
// Get .debug_loc entry for the instruction range starting at MI.
static DebugLocEntry::Value getDebugLocValue(const MachineInstr *MI) {
- const MDNode *Expr = MI->getDebugExpression();
+ const MDExpression *Expr = MI->getDebugExpression();
assert(MI->getNumOperands() == 4);
if (MI->getOperand(0).isReg()) {
OpenPOWER on IntegriCloud