diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-06-12 15:46:16 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-06-12 15:46:16 +0000 |
commit | 29cafa66ad3878dbb9f82615f19fa0bded2e443c (patch) | |
tree | c5e9e10bc189de0058aa763c47b9920a8351b7df /lib/AST/APValue.cpp | |
parent | 01af97d3b23bded2b2b21af19bbc6e4cce49e5b3 (diff) |
Diffstat (limited to 'lib/AST/APValue.cpp')
-rw-r--r-- | lib/AST/APValue.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AST/APValue.cpp b/lib/AST/APValue.cpp index 731d5e046681c..ebe99b12cdab0 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; |