summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-15 01:51:59 +0000
committerDan Gohman <gohman@apple.com>2010-04-15 01:51:59 +0000
commit46510a73e977273ec67747eb34cbdb43f815e451 (patch)
tree77f85024abba153c97d6af9aa800ad53b20c4fd2 /lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
parentcff6f85454034b9df419e5a1ee9244e086e84f1f (diff)
downloadllvm-46510a73e977273ec67747eb34cbdb43f815e451.tar.gz
llvm-46510a73e977273ec67747eb34cbdb43f815e451.tar.bz2
llvm-46510a73e977273ec67747eb34cbdb43f815e451.tar.xz
Add const qualifiers to CodeGen's use of LLVM IR constructs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SDNodeDbgValue.h')
-rw-r--r--lib/CodeGen/SelectionDAG/SDNodeDbgValue.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h b/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
index 9d1568f01f..ac2d33884b 100644
--- a/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
+++ b/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
@@ -41,7 +41,7 @@ private:
SDNode *Node; // valid for expressions
unsigned ResNo; // valid for expressions
} s;
- Value *Const; // valid for constants
+ const Value *Const; // valid for constants
unsigned FrameIx; // valid for stack objects
} u;
MDNode *mdPtr;
@@ -60,7 +60,8 @@ public:
}
// Constructor for constants.
- SDDbgValue(MDNode *mdP, Value *C, uint64_t off, DebugLoc dl, unsigned O) :
+ SDDbgValue(MDNode *mdP, const Value *C, uint64_t off, DebugLoc dl,
+ unsigned O) :
mdPtr(mdP), Offset(off), DL(dl), Order(O), Invalid(false) {
kind = CONST;
u.Const = C;
@@ -86,7 +87,7 @@ public:
unsigned getResNo() { assert (kind==SDNODE); return u.s.ResNo; }
// Returns the Value* for a constant
- Value *getConst() { assert (kind==CONST); return u.Const; }
+ const Value *getConst() { assert (kind==CONST); return u.Const; }
// Returns the FrameIx for a stack object
unsigned getFrameIx() { assert (kind==FRAMEIX); return u.FrameIx; }