diff options
author | Anders Carlsson <andersca@mac.com> | 2008-07-03 04:20:39 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-07-03 04:20:39 +0000 |
commit | c44eec6dd29ee9415cbd38a35deff4c8b67abb6a (patch) | |
tree | b3cac552b6f65c3a5124309a82853842e4f0f03a /include/clang/AST/APValue.h | |
parent | 2e478080f83f90728d8d56099cd32180c57debbc (diff) | |
download | clang-c44eec6dd29ee9415cbd38a35deff4c8b67abb6a.tar.gz clang-c44eec6dd29ee9415cbd38a35deff4c8b67abb6a.tar.bz2 clang-c44eec6dd29ee9415cbd38a35deff4c8b67abb6a.tar.xz |
Shuffle things around in preparation for integrating Eli's constant evaluator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/APValue.h')
-rw-r--r-- | include/clang/AST/APValue.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/clang/AST/APValue.h b/include/clang/AST/APValue.h index 626019c31b..ba3d86bf49 100644 --- a/include/clang/AST/APValue.h +++ b/include/clang/AST/APValue.h @@ -18,9 +18,10 @@ #include "llvm/ADT/APFloat.h" namespace clang { + class Expr; /// APValue - This class implements a discriminated union of [uninitialized] -/// [APSInt] [APFloat], [Complex APSInt] [Complex APFloat]. +/// [APSInt] [APFloat], [Complex APSInt] [Complex APFloat], [Expr + Offset]. class APValue { typedef llvm::APSInt APSInt; typedef llvm::APFloat APFloat; @@ -30,7 +31,8 @@ public: SInt, Float, ComplexSInt, - ComplexFloat + ComplexFloat, + LValue }; private: ValueKind Kind; @@ -44,6 +46,11 @@ private: ComplexAPFloat() : Real(0.0), Imag(0.0) {} }; + struct LValue { + Expr* Base; + uint64_t Offset; + }; + enum { MaxSize = (sizeof(ComplexAPSInt) > sizeof(ComplexAPFloat) ? sizeof(ComplexAPSInt) : sizeof(ComplexAPFloat)) |