summaryrefslogtreecommitdiffstats
path: root/lib/AST/APValue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/APValue.cpp')
-rw-r--r--lib/AST/APValue.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AST/APValue.cpp b/lib/AST/APValue.cpp
index 731d5e0..ebe99b1 100644
--- a/lib/AST/APValue.cpp
+++ b/lib/AST/APValue.cpp
@@ -18,12 +18,12 @@ using namespace clang;
namespace {
struct LV {
- Expr* Base;
+ const Expr* Base;
CharUnits Offset;
};
}
-APValue::APValue(Expr* B) : Kind(Uninitialized) {
+APValue::APValue(const Expr* B) : Kind(Uninitialized) {
MakeLValue(); setLValue(B, CharUnits::Zero());
}
@@ -118,7 +118,7 @@ void APValue::print(llvm::raw_ostream &OS) const {
}
}
-Expr* APValue::getLValueBase() const {
+const Expr* APValue::getLValueBase() const {
assert(isLValue() && "Invalid accessor");
return ((const LV*)(const void*)Data)->Base;
}
@@ -128,7 +128,7 @@ CharUnits APValue::getLValueOffset() const {
return ((const LV*)(const void*)Data)->Offset;
}
-void APValue::setLValue(Expr *B, const CharUnits &O) {
+void APValue::setLValue(const Expr *B, const CharUnits &O) {
assert(isLValue() && "Invalid accessor");
((LV*)(char*)Data)->Base = B;
((LV*)(char*)Data)->Offset = O;
OpenPOWER on IntegriCloud