diff options
author | Yaxun Liu <Yaxun.Liu@amd.com> | 2016-12-15 08:09:08 +0000 |
---|---|---|
committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2016-12-15 08:09:08 +0000 |
commit | fbed33dec5326ee5ea8ba0a401fc46791ec5bd42 (patch) | |
tree | 6791fd53b376c4d9e7058db0ea6ff5f08fbbf619 /include/clang/AST/APValue.h | |
parent | 363cb41c53b4b03af2129fdcaa5f09a8ec37cd17 (diff) |
Re-commit r289252 and r289285, and fix PR31374
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/APValue.h')
-rw-r--r-- | include/clang/AST/APValue.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/clang/AST/APValue.h b/include/clang/AST/APValue.h index e58c21923f..7c431f3be8 100644 --- a/include/clang/AST/APValue.h +++ b/include/clang/AST/APValue.h @@ -135,14 +135,15 @@ public: } APValue(const APValue &RHS); APValue(APValue &&RHS) : Kind(Uninitialized) { swap(RHS); } - APValue(LValueBase B, const CharUnits &O, NoLValuePath N, unsigned CallIndex) + APValue(LValueBase B, const CharUnits &O, NoLValuePath N, unsigned CallIndex, + bool IsNullPtr = false) : Kind(Uninitialized) { - MakeLValue(); setLValue(B, O, N, CallIndex); + MakeLValue(); setLValue(B, O, N, CallIndex, IsNullPtr); } APValue(LValueBase B, const CharUnits &O, ArrayRef<LValuePathEntry> Path, - bool OnePastTheEnd, unsigned CallIndex) + bool OnePastTheEnd, unsigned CallIndex, bool IsNullPtr = false) : Kind(Uninitialized) { - MakeLValue(); setLValue(B, O, Path, OnePastTheEnd, CallIndex); + MakeLValue(); setLValue(B, O, Path, OnePastTheEnd, CallIndex, IsNullPtr); } APValue(UninitArray, unsigned InitElts, unsigned Size) : Kind(Uninitialized) { MakeArray(InitElts, Size); @@ -254,6 +255,7 @@ public: bool hasLValuePath() const; ArrayRef<LValuePathEntry> getLValuePath() const; unsigned getLValueCallIndex() const; + bool isNullPointer() const; APValue &getVectorElt(unsigned I) { assert(isVector() && "Invalid accessor"); @@ -374,10 +376,10 @@ public: ((ComplexAPFloat *)(char *)Data.buffer)->Imag = std::move(I); } void setLValue(LValueBase B, const CharUnits &O, NoLValuePath, - unsigned CallIndex); + unsigned CallIndex, bool IsNullPtr); void setLValue(LValueBase B, const CharUnits &O, ArrayRef<LValuePathEntry> Path, bool OnePastTheEnd, - unsigned CallIndex); + unsigned CallIndex, bool IsNullPtr); void setUnion(const FieldDecl *Field, const APValue &Value) { assert(isUnion() && "Invalid accessor"); ((UnionData*)(char*)Data.buffer)->Field = Field; |