clang  3.9.0
APValue.h
Go to the documentation of this file.
1 //===--- APValue.h - Union class for APFloat/APSInt/Complex -----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the APValue class.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_AST_APVALUE_H
15 #define LLVM_CLANG_AST_APVALUE_H
16 
17 #include "clang/Basic/LLVM.h"
18 #include "llvm/ADT/APFloat.h"
19 #include "llvm/ADT/APSInt.h"
20 #include "llvm/ADT/PointerIntPair.h"
21 #include "llvm/ADT/PointerUnion.h"
22 
23 namespace clang {
24  class AddrLabelExpr;
25  class ASTContext;
26  class CharUnits;
27  class DiagnosticBuilder;
28  class Expr;
29  class FieldDecl;
30  class Decl;
31  class ValueDecl;
32  class CXXRecordDecl;
33  class QualType;
34 
35 /// APValue - This class implements a discriminated union of [uninitialized]
36 /// [APSInt] [APFloat], [Complex APSInt] [Complex APFloat], [Expr + Offset],
37 /// [Vector: N * APValue], [Array: N * APValue]
38 class APValue {
39  typedef llvm::APSInt APSInt;
40  typedef llvm::APFloat APFloat;
41 public:
42  enum ValueKind {
44  Int,
55  };
56  typedef llvm::PointerUnion<const ValueDecl *, const Expr *> LValueBase;
57  typedef llvm::PointerIntPair<const Decl *, 1, bool> BaseOrMemberType;
59  /// BaseOrMember - The FieldDecl or CXXRecordDecl indicating the next item
60  /// in the path. An opaque value of type BaseOrMemberType.
61  void *BaseOrMember;
62  /// ArrayIndex - The array index of the next item in the path.
63  uint64_t ArrayIndex;
64  };
65  struct NoLValuePath {};
66  struct UninitArray {};
67  struct UninitStruct {};
68 private:
70 
71  struct ComplexAPSInt {
72  APSInt Real, Imag;
73  ComplexAPSInt() : Real(1), Imag(1) {}
74  };
75  struct ComplexAPFloat {
76  APFloat Real, Imag;
77  ComplexAPFloat() : Real(0.0), Imag(0.0) {}
78  };
79  struct LV;
80  struct Vec {
81  APValue *Elts;
82  unsigned NumElts;
83  Vec() : Elts(nullptr), NumElts(0) {}
84  ~Vec() { delete[] Elts; }
85  };
86  struct Arr {
87  APValue *Elts;
88  unsigned NumElts, ArrSize;
89  Arr(unsigned NumElts, unsigned ArrSize);
90  ~Arr();
91  };
92  struct StructData {
93  APValue *Elts;
94  unsigned NumBases;
95  unsigned NumFields;
96  StructData(unsigned NumBases, unsigned NumFields);
97  ~StructData();
98  };
99  struct UnionData {
100  const FieldDecl *Field;
101  APValue *Value;
102  UnionData();
103  ~UnionData();
104  };
105  struct AddrLabelDiffData {
106  const AddrLabelExpr* LHSExpr;
107  const AddrLabelExpr* RHSExpr;
108  };
109  struct MemberPointerData;
110 
111  // We ensure elsewhere that Data is big enough for LV and MemberPointerData.
112  typedef llvm::AlignedCharArrayUnion<void *, APSInt, APFloat, ComplexAPSInt,
113  ComplexAPFloat, Vec, Arr, StructData,
114  UnionData, AddrLabelDiffData> DataType;
115  static const size_t DataSize = sizeof(DataType);
116 
117  DataType Data;
118 
119 public:
121  explicit APValue(APSInt I) : Kind(Uninitialized) {
122  MakeInt(); setInt(std::move(I));
123  }
124  explicit APValue(APFloat F) : Kind(Uninitialized) {
125  MakeFloat(); setFloat(std::move(F));
126  }
127  explicit APValue(const APValue *E, unsigned N) : Kind(Uninitialized) {
128  MakeVector(); setVector(E, N);
129  }
130  APValue(APSInt R, APSInt I) : Kind(Uninitialized) {
131  MakeComplexInt(); setComplexInt(std::move(R), std::move(I));
132  }
133  APValue(APFloat R, APFloat I) : Kind(Uninitialized) {
134  MakeComplexFloat(); setComplexFloat(std::move(R), std::move(I));
135  }
136  APValue(const APValue &RHS);
137  APValue(APValue &&RHS) : Kind(Uninitialized) { swap(RHS); }
138  APValue(LValueBase B, const CharUnits &O, NoLValuePath N, unsigned CallIndex)
139  : Kind(Uninitialized) {
140  MakeLValue(); setLValue(B, O, N, CallIndex);
141  }
143  bool OnePastTheEnd, unsigned CallIndex)
144  : Kind(Uninitialized) {
145  MakeLValue(); setLValue(B, O, Path, OnePastTheEnd, CallIndex);
146  }
147  APValue(UninitArray, unsigned InitElts, unsigned Size) : Kind(Uninitialized) {
148  MakeArray(InitElts, Size);
149  }
150  APValue(UninitStruct, unsigned B, unsigned M) : Kind(Uninitialized) {
151  MakeStruct(B, M);
152  }
153  explicit APValue(const FieldDecl *D, const APValue &V = APValue())
154  : Kind(Uninitialized) {
155  MakeUnion(); setUnion(D, V);
156  }
157  APValue(const ValueDecl *Member, bool IsDerivedMember,
159  MakeMemberPointer(Member, IsDerivedMember, Path);
160  }
161  APValue(const AddrLabelExpr* LHSExpr, const AddrLabelExpr* RHSExpr)
162  : Kind(Uninitialized) {
163  MakeAddrLabelDiff(); setAddrLabelDiff(LHSExpr, RHSExpr);
164  }
165 
167  MakeUninit();
168  }
169 
170  /// \brief Returns whether the object performed allocations.
171  ///
172  /// If APValues are constructed via placement new, \c needsCleanup()
173  /// indicates whether the destructor must be called in order to correctly
174  /// free all allocated memory.
175  bool needsCleanup() const;
176 
177  /// \brief Swaps the contents of this and the given APValue.
178  void swap(APValue &RHS);
179 
180  ValueKind getKind() const { return Kind; }
181  bool isUninit() const { return Kind == Uninitialized; }
182  bool isInt() const { return Kind == Int; }
183  bool isFloat() const { return Kind == Float; }
184  bool isComplexInt() const { return Kind == ComplexInt; }
185  bool isComplexFloat() const { return Kind == ComplexFloat; }
186  bool isLValue() const { return Kind == LValue; }
187  bool isVector() const { return Kind == Vector; }
188  bool isArray() const { return Kind == Array; }
189  bool isStruct() const { return Kind == Struct; }
190  bool isUnion() const { return Kind == Union; }
191  bool isMemberPointer() const { return Kind == MemberPointer; }
192  bool isAddrLabelDiff() const { return Kind == AddrLabelDiff; }
193 
194  void dump() const;
195  void dump(raw_ostream &OS) const;
196 
197  void printPretty(raw_ostream &OS, ASTContext &Ctx, QualType Ty) const;
198  std::string getAsString(ASTContext &Ctx, QualType Ty) const;
199 
200  APSInt &getInt() {
201  assert(isInt() && "Invalid accessor");
202  return *(APSInt*)(char*)Data.buffer;
203  }
204  const APSInt &getInt() const {
205  return const_cast<APValue*>(this)->getInt();
206  }
207 
208  APFloat &getFloat() {
209  assert(isFloat() && "Invalid accessor");
210  return *(APFloat*)(char*)Data.buffer;
211  }
212  const APFloat &getFloat() const {
213  return const_cast<APValue*>(this)->getFloat();
214  }
215 
216  APSInt &getComplexIntReal() {
217  assert(isComplexInt() && "Invalid accessor");
218  return ((ComplexAPSInt*)(char*)Data.buffer)->Real;
219  }
220  const APSInt &getComplexIntReal() const {
221  return const_cast<APValue*>(this)->getComplexIntReal();
222  }
223 
224  APSInt &getComplexIntImag() {
225  assert(isComplexInt() && "Invalid accessor");
226  return ((ComplexAPSInt*)(char*)Data.buffer)->Imag;
227  }
228  const APSInt &getComplexIntImag() const {
229  return const_cast<APValue*>(this)->getComplexIntImag();
230  }
231 
232  APFloat &getComplexFloatReal() {
233  assert(isComplexFloat() && "Invalid accessor");
234  return ((ComplexAPFloat*)(char*)Data.buffer)->Real;
235  }
236  const APFloat &getComplexFloatReal() const {
237  return const_cast<APValue*>(this)->getComplexFloatReal();
238  }
239 
240  APFloat &getComplexFloatImag() {
241  assert(isComplexFloat() && "Invalid accessor");
242  return ((ComplexAPFloat*)(char*)Data.buffer)->Imag;
243  }
244  const APFloat &getComplexFloatImag() const {
245  return const_cast<APValue*>(this)->getComplexFloatImag();
246  }
247 
248  const LValueBase getLValueBase() const;
250  const CharUnits &getLValueOffset() const {
251  return const_cast<APValue*>(this)->getLValueOffset();
252  }
253  bool isLValueOnePastTheEnd() const;
254  bool hasLValuePath() const;
256  unsigned getLValueCallIndex() const;
257 
258  APValue &getVectorElt(unsigned I) {
259  assert(isVector() && "Invalid accessor");
260  assert(I < getVectorLength() && "Index out of range");
261  return ((Vec*)(char*)Data.buffer)->Elts[I];
262  }
263  const APValue &getVectorElt(unsigned I) const {
264  return const_cast<APValue*>(this)->getVectorElt(I);
265  }
266  unsigned getVectorLength() const {
267  assert(isVector() && "Invalid accessor");
268  return ((const Vec*)(const void *)Data.buffer)->NumElts;
269  }
270 
272  assert(isArray() && "Invalid accessor");
273  assert(I < getArrayInitializedElts() && "Index out of range");
274  return ((Arr*)(char*)Data.buffer)->Elts[I];
275  }
276  const APValue &getArrayInitializedElt(unsigned I) const {
277  return const_cast<APValue*>(this)->getArrayInitializedElt(I);
278  }
279  bool hasArrayFiller() const {
281  }
283  assert(isArray() && "Invalid accessor");
284  assert(hasArrayFiller() && "No array filler");
285  return ((Arr*)(char*)Data.buffer)->Elts[getArrayInitializedElts()];
286  }
287  const APValue &getArrayFiller() const {
288  return const_cast<APValue*>(this)->getArrayFiller();
289  }
290  unsigned getArrayInitializedElts() const {
291  assert(isArray() && "Invalid accessor");
292  return ((const Arr*)(const void *)Data.buffer)->NumElts;
293  }
294  unsigned getArraySize() const {
295  assert(isArray() && "Invalid accessor");
296  return ((const Arr*)(const void *)Data.buffer)->ArrSize;
297  }
298 
299  unsigned getStructNumBases() const {
300  assert(isStruct() && "Invalid accessor");
301  return ((const StructData*)(const char*)Data.buffer)->NumBases;
302  }
303  unsigned getStructNumFields() const {
304  assert(isStruct() && "Invalid accessor");
305  return ((const StructData*)(const char*)Data.buffer)->NumFields;
306  }
307  APValue &getStructBase(unsigned i) {
308  assert(isStruct() && "Invalid accessor");
309  return ((StructData*)(char*)Data.buffer)->Elts[i];
310  }
311  APValue &getStructField(unsigned i) {
312  assert(isStruct() && "Invalid accessor");
313  return ((StructData*)(char*)Data.buffer)->Elts[getStructNumBases() + i];
314  }
315  const APValue &getStructBase(unsigned i) const {
316  return const_cast<APValue*>(this)->getStructBase(i);
317  }
318  const APValue &getStructField(unsigned i) const {
319  return const_cast<APValue*>(this)->getStructField(i);
320  }
321 
322  const FieldDecl *getUnionField() const {
323  assert(isUnion() && "Invalid accessor");
324  return ((const UnionData*)(const char*)Data.buffer)->Field;
325  }
327  assert(isUnion() && "Invalid accessor");
328  return *((UnionData*)(char*)Data.buffer)->Value;
329  }
330  const APValue &getUnionValue() const {
331  return const_cast<APValue*>(this)->getUnionValue();
332  }
333 
334  const ValueDecl *getMemberPointerDecl() const;
335  bool isMemberPointerToDerivedMember() const;
337 
339  assert(isAddrLabelDiff() && "Invalid accessor");
340  return ((const AddrLabelDiffData*)(const char*)Data.buffer)->LHSExpr;
341  }
343  assert(isAddrLabelDiff() && "Invalid accessor");
344  return ((const AddrLabelDiffData*)(const char*)Data.buffer)->RHSExpr;
345  }
346 
347  void setInt(APSInt I) {
348  assert(isInt() && "Invalid accessor");
349  *(APSInt *)(char *)Data.buffer = std::move(I);
350  }
351  void setFloat(APFloat F) {
352  assert(isFloat() && "Invalid accessor");
353  *(APFloat *)(char *)Data.buffer = std::move(F);
354  }
355  void setVector(const APValue *E, unsigned N) {
356  assert(isVector() && "Invalid accessor");
357  ((Vec*)(char*)Data.buffer)->Elts = new APValue[N];
358  ((Vec*)(char*)Data.buffer)->NumElts = N;
359  for (unsigned i = 0; i != N; ++i)
360  ((Vec*)(char*)Data.buffer)->Elts[i] = E[i];
361  }
362  void setComplexInt(APSInt R, APSInt I) {
363  assert(R.getBitWidth() == I.getBitWidth() &&
364  "Invalid complex int (type mismatch).");
365  assert(isComplexInt() && "Invalid accessor");
366  ((ComplexAPSInt *)(char *)Data.buffer)->Real = std::move(R);
367  ((ComplexAPSInt *)(char *)Data.buffer)->Imag = std::move(I);
368  }
369  void setComplexFloat(APFloat R, APFloat I) {
370  assert(&R.getSemantics() == &I.getSemantics() &&
371  "Invalid complex float (type mismatch).");
372  assert(isComplexFloat() && "Invalid accessor");
373  ((ComplexAPFloat *)(char *)Data.buffer)->Real = std::move(R);
374  ((ComplexAPFloat *)(char *)Data.buffer)->Imag = std::move(I);
375  }
376  void setLValue(LValueBase B, const CharUnits &O, NoLValuePath,
377  unsigned CallIndex);
378  void setLValue(LValueBase B, const CharUnits &O,
379  ArrayRef<LValuePathEntry> Path, bool OnePastTheEnd,
380  unsigned CallIndex);
381  void setUnion(const FieldDecl *Field, const APValue &Value) {
382  assert(isUnion() && "Invalid accessor");
383  ((UnionData*)(char*)Data.buffer)->Field = Field;
384  *((UnionData*)(char*)Data.buffer)->Value = Value;
385  }
386  void setAddrLabelDiff(const AddrLabelExpr* LHSExpr,
387  const AddrLabelExpr* RHSExpr) {
388  ((AddrLabelDiffData*)(char*)Data.buffer)->LHSExpr = LHSExpr;
389  ((AddrLabelDiffData*)(char*)Data.buffer)->RHSExpr = RHSExpr;
390  }
391 
392  /// Assign by swapping from a copy of the RHS.
394  swap(RHS);
395  return *this;
396  }
397 
398 private:
399  void DestroyDataAndMakeUninit();
400  void MakeUninit() {
401  if (Kind != Uninitialized)
402  DestroyDataAndMakeUninit();
403  }
404  void MakeInt() {
405  assert(isUninit() && "Bad state change");
406  new ((void*)Data.buffer) APSInt(1);
407  Kind = Int;
408  }
409  void MakeFloat() {
410  assert(isUninit() && "Bad state change");
411  new ((void*)(char*)Data.buffer) APFloat(0.0);
412  Kind = Float;
413  }
414  void MakeVector() {
415  assert(isUninit() && "Bad state change");
416  new ((void*)(char*)Data.buffer) Vec();
417  Kind = Vector;
418  }
419  void MakeComplexInt() {
420  assert(isUninit() && "Bad state change");
421  new ((void*)(char*)Data.buffer) ComplexAPSInt();
422  Kind = ComplexInt;
423  }
424  void MakeComplexFloat() {
425  assert(isUninit() && "Bad state change");
426  new ((void*)(char*)Data.buffer) ComplexAPFloat();
427  Kind = ComplexFloat;
428  }
429  void MakeLValue();
430  void MakeArray(unsigned InitElts, unsigned Size);
431  void MakeStruct(unsigned B, unsigned M) {
432  assert(isUninit() && "Bad state change");
433  new ((void*)(char*)Data.buffer) StructData(B, M);
434  Kind = Struct;
435  }
436  void MakeUnion() {
437  assert(isUninit() && "Bad state change");
438  new ((void*)(char*)Data.buffer) UnionData();
439  Kind = Union;
440  }
441  void MakeMemberPointer(const ValueDecl *Member, bool IsDerivedMember,
442  ArrayRef<const CXXRecordDecl*> Path);
443  void MakeAddrLabelDiff() {
444  assert(isUninit() && "Bad state change");
445  new ((void*)(char*)Data.buffer) AddrLabelDiffData();
447  }
448 };
449 
450 } // end namespace clang.
451 
452 #endif
bool isArray() const
Definition: APValue.h:188
bool isVector() const
Definition: APValue.h:187
const FieldDecl * getUnionField() const
Definition: APValue.h:322
A (possibly-)qualified type.
Definition: Type.h:598
const APFloat & getComplexFloatImag() const
Definition: APValue.h:244
const APValue & getArrayInitializedElt(unsigned I) const
Definition: APValue.h:276
APValue(const AddrLabelExpr *LHSExpr, const AddrLabelExpr *RHSExpr)
Definition: APValue.h:161
APValue(LValueBase B, const CharUnits &O, NoLValuePath N, unsigned CallIndex)
Definition: APValue.h:138
const APValue & getStructBase(unsigned i) const
Definition: APValue.h:315
APValue(UninitStruct, unsigned B, unsigned M)
Definition: APValue.h:150
bool isMemberPointer() const
Definition: APValue.h:191
void * BaseOrMember
BaseOrMember - The FieldDecl or CXXRecordDecl indicating the next item in the path.
Definition: APValue.h:61
const APFloat & getFloat() const
Definition: APValue.h:212
bool hasLValuePath() const
Definition: APValue.cpp:568
APFloat & getComplexFloatReal()
Definition: APValue.h:232
ArrayRef< const CXXRecordDecl * > getMemberPointerPath() const
Definition: APValue.cpp:622
bool isComplexInt() const
Definition: APValue.h:184
APValue & operator=(APValue RHS)
Assign by swapping from a copy of the RHS.
Definition: APValue.h:393
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:92
APValue(const APValue *E, unsigned N)
Definition: APValue.h:127
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
Definition: Decl.h:2293
unsigned getLValueCallIndex() const
Definition: APValue.cpp:579
CharUnits - This is an opaque type for sizes expressed in character units.
Definition: CharUnits.h:38
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
const ValueDecl * getMemberPointerDecl() const
Definition: APValue.cpp:608
unsigned getStructNumFields() const
Definition: APValue.h:303
bool needsCleanup() const
Returns whether the object performed allocations.
Definition: APValue.cpp:215
APValue(APSInt I)
Definition: APValue.h:121
detail::InMemoryDirectory::const_iterator I
APSInt & getComplexIntReal()
Definition: APValue.h:216
void dump() const
Definition: APValue.cpp:258
APValue(UninitArray, unsigned InitElts, unsigned Size)
Definition: APValue.h:147
APValue & getVectorElt(unsigned I)
Definition: APValue.h:258
bool isAddrLabelDiff() const
Definition: APValue.h:192
const APSInt & getInt() const
Definition: APValue.h:204
APValue(APFloat F)
Definition: APValue.h:124
APValue & getArrayFiller()
Definition: APValue.h:282
uint64_t ArrayIndex
ArrayIndex - The array index of the next item in the path.
Definition: APValue.h:63
const APFloat & getComplexFloatReal() const
Definition: APValue.h:236
unsigned getArrayInitializedElts() const
Definition: APValue.h:290
friend class ASTContext
Definition: Type.h:4178
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Definition: Decl.h:590
bool isMemberPointerToDerivedMember() const
Definition: APValue.cpp:615
bool isComplexFloat() const
Definition: APValue.h:185
bool isUnion() const
Definition: APValue.h:190
bool isStruct() const
Definition: APValue.h:189
APValue(const FieldDecl *D, const APValue &V=APValue())
Definition: APValue.h:153
APValue(APFloat R, APFloat I)
Definition: APValue.h:133
APValue & getStructField(unsigned i)
Definition: APValue.h:311
APSInt & getComplexIntImag()
Definition: APValue.h:224
bool isLValueOnePastTheEnd() const
Definition: APValue.cpp:558
void setVector(const APValue *E, unsigned N)
Definition: APValue.h:355
APValue & getStructBase(unsigned i)
Definition: APValue.h:307
APValue & getArrayInitializedElt(unsigned I)
Definition: APValue.h:271
Kind
bool isUninit() const
Definition: APValue.h:181
void setInt(APSInt I)
Definition: APValue.h:347
unsigned getStructNumBases() const
Definition: APValue.h:299
const AddrLabelExpr * getAddrLabelDiffLHS() const
Definition: APValue.h:338
APValue & getUnionValue()
Definition: APValue.h:326
ValueKind getKind() const
Definition: APValue.h:180
APFloat & getFloat()
Definition: APValue.h:208
void setLValue(LValueBase B, const CharUnits &O, NoLValuePath, unsigned CallIndex)
Definition: APValue.cpp:584
void setAddrLabelDiff(const AddrLabelExpr *LHSExpr, const AddrLabelExpr *RHSExpr)
Definition: APValue.h:386
void printPretty(raw_ostream &OS, ASTContext &Ctx, QualType Ty) const
Definition: APValue.cpp:344
const AddrLabelExpr * getAddrLabelDiffRHS() const
Definition: APValue.h:342
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:3339
APValue(LValueBase B, const CharUnits &O, ArrayRef< LValuePathEntry > Path, bool OnePastTheEnd, unsigned CallIndex)
Definition: APValue.h:142
void swap(APValue &RHS)
Swaps the contents of this and the given APValue.
Definition: APValue.cpp:250
const APValue & getVectorElt(unsigned I) const
Definition: APValue.h:263
std::string getAsString(ASTContext &Ctx, QualType Ty) const
Definition: APValue.cpp:545
detail::InMemoryDirectory::const_iterator E
APValue(const ValueDecl *Member, bool IsDerivedMember, ArrayRef< const CXXRecordDecl * > Path)
Definition: APValue.h:157
APValue(APSInt R, APSInt I)
Definition: APValue.h:130
bool isFloat() const
Definition: APValue.h:183
ArrayRef< LValuePathEntry > getLValuePath() const
Definition: APValue.cpp:573
const CharUnits & getLValueOffset() const
Definition: APValue.h:250
const APSInt & getComplexIntReal() const
Definition: APValue.h:220
llvm::PointerUnion< const ValueDecl *, const Expr * > LValueBase
Definition: APValue.h:56
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat]...
Definition: APValue.h:38
APFloat & getComplexFloatImag()
Definition: APValue.h:240
const LValueBase getLValueBase() const
Definition: APValue.cpp:553
llvm::PointerIntPair< const Decl *, 1, bool > BaseOrMemberType
Definition: APValue.h:57
bool isInt() const
Definition: APValue.h:182
void setFloat(APFloat F)
Definition: APValue.h:351
void setComplexInt(APSInt R, APSInt I)
Definition: APValue.h:362
const APValue & getArrayFiller() const
Definition: APValue.h:287
void setUnion(const FieldDecl *Field, const APValue &Value)
Definition: APValue.h:381
APSInt & getInt()
Definition: APValue.h:200
unsigned getArraySize() const
Definition: APValue.h:294
const APValue & getUnionValue() const
Definition: APValue.h:330
unsigned getVectorLength() const
Definition: APValue.h:266
const APValue & getStructField(unsigned i) const
Definition: APValue.h:318
bool hasArrayFiller() const
Definition: APValue.h:279
void setComplexFloat(APFloat R, APFloat I)
Definition: APValue.h:369
CharUnits & getLValueOffset()
Definition: APValue.cpp:563
bool isLValue() const
Definition: APValue.h:186
APValue(APValue &&RHS)
Definition: APValue.h:137
const APSInt & getComplexIntImag() const
Definition: APValue.h:228