aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/APValue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/APValue.cpp')
-rw-r--r--lib/AST/APValue.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/AST/APValue.cpp b/lib/AST/APValue.cpp
index e64bf7cbce..146ebad055 100644
--- a/lib/AST/APValue.cpp
+++ b/lib/AST/APValue.cpp
@@ -21,7 +21,7 @@ using namespace clang;
namespace {
struct LVBase {
- const Expr *Base;
+ APValue::LValueBase Base;
CharUnits Offset;
unsigned PathLength;
};
@@ -75,11 +75,6 @@ APValue::UnionData::~UnionData () {
delete Value;
}
-APValue::APValue(const Expr* B) : Kind(Uninitialized) {
- MakeLValue();
- setLValue(B, CharUnits::Zero(), ArrayRef<LValuePathEntry>());
-}
-
const APValue &APValue::operator=(const APValue &RHS) {
if (this == &RHS)
return *this;
@@ -297,7 +292,7 @@ const DiagnosticBuilder &clang::operator<<(const DiagnosticBuilder &DB,
return DB << Out.str();
}
-const Expr* APValue::getLValueBase() const {
+const APValue::LValueBase APValue::getLValueBase() const {
assert(isLValue() && "Invalid accessor");
return ((const LV*)(const void*)Data)->Base;
}
@@ -318,7 +313,7 @@ ArrayRef<APValue::LValuePathEntry> APValue::getLValuePath() const {
return ArrayRef<LValuePathEntry>(LVal.getPath(), LVal.PathLength);
}
-void APValue::setLValue(const Expr *B, const CharUnits &O, NoLValuePath) {
+void APValue::setLValue(LValueBase B, const CharUnits &O, NoLValuePath) {
assert(isLValue() && "Invalid accessor");
LV &LVal = *((LV*)(char*)Data);
LVal.freePath();
@@ -327,7 +322,7 @@ void APValue::setLValue(const Expr *B, const CharUnits &O, NoLValuePath) {
LVal.PathLength = (unsigned)-1;
}
-void APValue::setLValue(const Expr *B, const CharUnits &O,
+void APValue::setLValue(LValueBase B, const CharUnits &O,
ArrayRef<LValuePathEntry> Path) {
assert(isLValue() && "Invalid accessor");
LV &LVal = *((LV*)(char*)Data);