clang  16.0.0git
CGBlocks.h
Go to the documentation of this file.
1 //===-- CGBlocks.h - state for LLVM CodeGen for blocks ----------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This is the internal state used for llvm translation for block literals.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_CLANG_LIB_CODEGEN_CGBLOCKS_H
14 #define LLVM_CLANG_LIB_CODEGEN_CGBLOCKS_H
15 
16 #include "CGBuilder.h"
17 #include "CGCall.h"
18 #include "CGValue.h"
19 #include "CodeGenFunction.h"
20 #include "CodeGenTypes.h"
21 #include "clang/AST/CharUnits.h"
22 #include "clang/AST/Expr.h"
23 #include "clang/AST/ExprCXX.h"
24 #include "clang/AST/ExprObjC.h"
25 #include "clang/AST/Type.h"
26 #include "clang/Basic/TargetInfo.h"
27 
28 namespace llvm {
29 class Value;
30 }
31 
32 namespace clang {
33 namespace CodeGen {
34 
35 class CGBlockInfo;
36 
37 // Flags stored in __block variables.
39  BLOCK_BYREF_HAS_COPY_DISPOSE = (1 << 25), // compiler
40  BLOCK_BYREF_LAYOUT_MASK = (0xF << 28), // compiler
46 };
47 
49  BLOCK_IS_NOESCAPE = (1 << 23),
51  BLOCK_HAS_CXX_OBJ = (1 << 26),
52  BLOCK_IS_GLOBAL = (1 << 28),
53  BLOCK_USE_STRET = (1 << 29),
54  BLOCK_HAS_SIGNATURE = (1 << 30),
56 };
57 class BlockFlags {
58  uint32_t flags;
59 
60 public:
61  BlockFlags(uint32_t flags) : flags(flags) {}
62  BlockFlags() : flags(0) {}
63  BlockFlags(BlockLiteralFlags flag) : flags(flag) {}
64  BlockFlags(BlockByrefFlags flag) : flags(flag) {}
65 
66  uint32_t getBitMask() const { return flags; }
67  bool empty() const { return flags == 0; }
68 
70  return BlockFlags(l.flags | r.flags);
71  }
73  l.flags |= r.flags;
74  return l;
75  }
76  friend bool operator&(BlockFlags l, BlockFlags r) {
77  return (l.flags & r.flags);
78  }
80  return (flags == r.flags);
81  }
82 };
84  return BlockFlags(l) | BlockFlags(r);
85 }
86 
88  BLOCK_FIELD_IS_OBJECT = 0x03, /* id, NSObject, __attribute__((NSObject)),
89  block, ... */
90  BLOCK_FIELD_IS_BLOCK = 0x07, /* a block variable */
91 
92  BLOCK_FIELD_IS_BYREF = 0x08, /* the on stack structure holding the __block
93  variable */
94  BLOCK_FIELD_IS_WEAK = 0x10, /* declared __weak, only used in byref copy
95  helpers */
96  BLOCK_FIELD_IS_ARC = 0x40, /* field has ARC-specific semantics */
97  BLOCK_BYREF_CALLER = 128, /* called from __block (byref) copy/dispose
98  support routines */
100 };
101 
103  uint32_t flags;
104 
105  BlockFieldFlags(uint32_t flags) : flags(flags) {}
106 public:
107  BlockFieldFlags() : flags(0) {}
108  BlockFieldFlags(BlockFieldFlag_t flag) : flags(flag) {}
109 
110  uint32_t getBitMask() const { return flags; }
111  bool empty() const { return flags == 0; }
112 
113  /// Answers whether the flags indicate that this field is an object
114  /// or block pointer that requires _Block_object_assign/dispose.
115  bool isSpecialPointer() const { return flags & BLOCK_FIELD_IS_OBJECT; }
116 
118  return BlockFieldFlags(l.flags | r.flags);
119  }
121  l.flags |= r.flags;
122  return l;
123  }
125  return (l.flags & r.flags);
126  }
127  bool operator==(BlockFieldFlags Other) const {
128  return flags == Other.flags;
129  }
130 };
132  return BlockFieldFlags(l) | BlockFieldFlags(r);
133 }
134 
135 /// Information about the layout of a __block variable.
137 public:
138  llvm::StructType *Type;
139  unsigned FieldIndex;
142 };
143 
144 /// Represents a type of copy/destroy operation that should be performed for an
145 /// entity that's captured by a block.
147  None,
148  CXXRecord, // Copy or destroy
149  ARCWeak,
150  ARCStrong,
152  BlockObject, // Assign or release
153 };
154 
155 /// CGBlockInfo - Information to generate a block literal.
156 class CGBlockInfo {
157 public:
158  /// Name - The name of the block, kindof.
159  StringRef Name;
160 
161  /// The field index of 'this' within the block, if there is one.
162  unsigned CXXThisIndex;
163 
164  class Capture {
165  uintptr_t Data;
168 
169  /// Type of the capture field. Normally, this is identical to the type of
170  /// the capture's VarDecl, but can be different if there is an enclosing
171  /// lambda.
172  QualType FieldType;
173 
174  public:
175  bool isIndex() const { return (Data & 1) != 0; }
176  bool isConstant() const { return !isIndex(); }
177 
178  unsigned getIndex() const {
179  assert(isIndex());
180  return Data >> 1;
181  }
183  assert(isIndex());
185  }
187  assert(isIndex());
188  return Cleanup;
189  }
191  assert(isIndex());
192  Cleanup = cleanup;
193  }
194 
195  llvm::Value *getConstant() const {
196  assert(isConstant());
197  return reinterpret_cast<llvm::Value*>(Data);
198  }
199 
200  QualType fieldType() const {
201  return FieldType;
202  }
203 
204  static Capture
205  makeIndex(unsigned index, CharUnits offset, QualType FieldType,
208  const BlockDecl::Capture *Cap) {
209  Capture v;
210  v.Data = (index << 1) | 1;
211  v.Offset = offset.getQuantity();
212  v.FieldType = FieldType;
213  v.CopyKind = CopyKind;
214  v.CopyFlags = CopyFlags;
215  v.DisposeKind = DisposeKind;
216  v.DisposeFlags = DisposeFlags;
217  v.Cap = Cap;
218  return v;
219  }
220 
221  static Capture makeConstant(llvm::Value *value,
222  const BlockDecl::Capture *Cap) {
223  Capture v;
224  v.Data = reinterpret_cast<uintptr_t>(value);
225  v.Cap = Cap;
226  return v;
227  }
228 
229  bool isConstantOrTrivial() const {
232  }
233 
238  };
239 
240  /// CanBeGlobal - True if the block can be global, i.e. it has
241  /// no non-constant captures.
242  bool CanBeGlobal : 1;
243 
244  /// True if the block has captures that would necessitate custom copy or
245  /// dispose helper functions if the block were escaping.
247 
248  /// Indicates whether the block is non-escaping.
249  bool NoEscape : 1;
250 
251  /// HasCXXObject - True if the block's custom copy/dispose functions
252  /// need to be run even in GC mode.
253  bool HasCXXObject : 1;
254 
255  /// UsesStret : True if the block uses an stret return. Mutable
256  /// because it gets set later in the block-creation process.
257  mutable bool UsesStret : 1;
258 
259  /// HasCapturedVariableLayout : True if block has captured variables
260  /// and their layout meta-data has been generated.
262 
263  /// Indicates whether an object of a non-external C++ class is captured. This
264  /// bit is used to determine the linkage of the block copy/destroy helper
265  /// functions.
267 
268  /// Mapping from variables to pointers to captures in SortedCaptures.
269  llvm::DenseMap<const VarDecl *, Capture *> Captures;
270 
271  /// The block's captures. Non-constant captures are sorted by their offsets.
273 
275  llvm::StructType *StructureType;
276  const BlockDecl *Block;
281 
282  // Offset of the gap caused by block header having a smaller
283  // alignment than the alignment of the block descriptor. This
284  // is the gap offset before the first capturued field.
286  // Gap size caused by aligning first field after block header.
287  // This could be zero if no forced alignment is required.
289 
290  /// The next block in the block-info chain. Invalid if this block
291  /// info is not part of the CGF's block-info chain, which is true
292  /// if it corresponds to a global block or a block whose expression
293  /// has been encountered.
295 
297  for (auto &C : SortedCaptures)
298  Captures[C.Cap->getVariable()] = &C;
299  }
300 
301  const Capture &getCapture(const VarDecl *var) const {
302  return const_cast<CGBlockInfo*>(this)->getCapture(var);
303  }
305  auto it = Captures.find(var);
306  assert(it != Captures.end() && "no entry for variable!");
307  return *it->second;
308  }
309 
310  const BlockDecl *getBlockDecl() const { return Block; }
311  const BlockExpr *getBlockExpr() const {
312  assert(BlockExpression);
313  assert(BlockExpression->getBlockDecl() == Block);
314  return BlockExpression;
315  }
316 
317  CGBlockInfo(const BlockDecl *blockDecl, StringRef Name);
318 };
319 
320 } // end namespace CodeGen
321 } // end namespace clang
322 
323 #endif
clang::CodeGen::CGBlockInfo::BlockExpression
const BlockExpr * BlockExpression
Definition: CGBlocks.h:277
clang::CodeGen::BlockFlags::operator|=
friend BlockFlags & operator|=(BlockFlags &l, BlockFlags r)
Definition: CGBlocks.h:72
llvm
YAML serialization mapping.
Definition: Dominators.h:30
clang::CodeGen::CGBlockInfo::CGBlockInfo
CGBlockInfo(const BlockDecl *blockDecl, StringRef Name)
Definition: CGBlocks.cpp:35
clang::CodeGen::CGBlockInfo::CXXThisOffset
CharUnits CXXThisOffset
Definition: CGBlocks.h:280
clang::CodeGen::CGBlockInfo::LocalAddress
Address LocalAddress
Definition: CGBlocks.h:274
clang::CodeGen::BlockByrefInfo::FieldIndex
unsigned FieldIndex
Definition: CGBlocks.h:139
CodeGenFunction.h
clang::CodeGen::BlockByrefInfo
Information about the layout of a __block variable.
Definition: CGBlocks.h:136
clang::CodeGen::BlockByrefInfo::ByrefAlignment
CharUnits ByrefAlignment
Definition: CGBlocks.h:140
clang::CodeGen::BlockCaptureEntityKind::None
@ None
clang::CodeGen::CGBlockInfo::Capture::DisposeKind
BlockCaptureEntityKind DisposeKind
Definition: CGBlocks.h:235
clang::CodeGen::BlockCaptureEntityKind::ARCWeak
@ ARCWeak
llvm::SmallVector
Definition: LLVM.h:38
clang::CodeGen::CGBlockInfo::UsesStret
bool UsesStret
UsesStret : True if the block uses an stret return.
Definition: CGBlocks.h:257
TargetInfo.h
clang::CodeGen::CGBlockInfo::BlockAlign
CharUnits BlockAlign
Definition: CGBlocks.h:279
clang::CharUnits::QuantityType
int64_t QuantityType
Definition: CharUnits.h:40
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:737
clang::CodeGen::CGBlockInfo
CGBlockInfo - Information to generate a block literal.
Definition: CGBlocks.h:156
clang::CodeGen::BlockFieldFlags::operator|
friend BlockFieldFlags operator|(BlockFieldFlags l, BlockFieldFlags r)
Definition: CGBlocks.h:117
clang::CodeGen::BLOCK_BYREF_HAS_COPY_DISPOSE
@ BLOCK_BYREF_HAS_COPY_DISPOSE
Definition: CGBlocks.h:39
clang::CodeGen::BLOCK_HAS_EXTENDED_LAYOUT
@ BLOCK_HAS_EXTENDED_LAYOUT
Definition: CGBlocks.h:55
clang::CodeGen::CGBlockInfo::Capture::CopyKind
BlockCaptureEntityKind CopyKind
Definition: CGBlocks.h:234
clang::CodeGen::CGBlockInfo::getCapture
const Capture & getCapture(const VarDecl *var) const
Definition: CGBlocks.h:301
clang::CodeGen::CGBlockInfo::Capture::isIndex
bool isIndex() const
Definition: CGBlocks.h:175
clang::CodeGen::CGBlockInfo::getCapture
Capture & getCapture(const VarDecl *var)
Definition: CGBlocks.h:304
clang::CodeGen::BlockFlags::operator==
bool operator==(BlockFlags r)
Definition: CGBlocks.h:79
clang::CodeGen::BlockFlags::operator|
friend BlockFlags operator|(BlockFlags l, BlockFlags r)
Definition: CGBlocks.h:69
clang::CodeGen::BlockFieldFlags::operator|=
friend BlockFieldFlags & operator|=(BlockFieldFlags &l, BlockFieldFlags r)
Definition: CGBlocks.h:120
clang::CodeGen::BLOCK_BYREF_LAYOUT_UNRETAINED
@ BLOCK_BYREF_LAYOUT_UNRETAINED
Definition: CGBlocks.h:45
clang::CodeGen::BLOCK_USE_STRET
@ BLOCK_USE_STRET
Definition: CGBlocks.h:53
clang::CodeGen::BlockFieldFlags::BlockFieldFlags
BlockFieldFlags()
Definition: CGBlocks.h:107
clang::CodeGen::BlockLiteralFlags
BlockLiteralFlags
Definition: CGBlocks.h:48
clang::CodeGen::CGBlockInfo::NeedsCopyDispose
bool NeedsCopyDispose
True if the block has captures that would necessitate custom copy or dispose helper functions if the ...
Definition: CGBlocks.h:246
clang::CodeGen::BlockFieldFlag_t
BlockFieldFlag_t
Definition: CGBlocks.h:87
clang::ast_matchers::blockDecl
const internal::VariadicDynCastAllOfMatcher< Decl, BlockDecl > blockDecl
Matches block declarations.
Definition: ASTMatchersInternal.cpp:836
clang::CodeGen::CGBlockInfo::Capture::setCleanup
void setCleanup(EHScopeStack::stable_iterator cleanup)
Definition: CGBlocks.h:190
clang::CodeGen::CGBlockInfo::Capture
Definition: CGBlocks.h:164
clang::CodeGen::BLOCK_HAS_CXX_OBJ
@ BLOCK_HAS_CXX_OBJ
Definition: CGBlocks.h:51
Offset
unsigned Offset
Definition: Format.cpp:2717
clang::CodeGen::CGBlockInfo::HasCapturedVariableLayout
bool HasCapturedVariableLayout
HasCapturedVariableLayout : True if block has captured variables and their layout meta-data has been ...
Definition: CGBlocks.h:261
clang::CodeGen::BlockFieldFlags::operator&
friend bool operator&(BlockFieldFlags l, BlockFieldFlags r)
Definition: CGBlocks.h:124
clang::CodeGen::BLOCK_BYREF_LAYOUT_EXTENDED
@ BLOCK_BYREF_LAYOUT_EXTENDED
Definition: CGBlocks.h:41
clang::CodeGen::BlockFlags::BlockFlags
BlockFlags(BlockLiteralFlags flag)
Definition: CGBlocks.h:63
clang::CodeGen::BLOCK_BYREF_LAYOUT_NON_OBJECT
@ BLOCK_BYREF_LAYOUT_NON_OBJECT
Definition: CGBlocks.h:42
clang::CodeGen::CGBlockInfo::BlockHeaderForcedGapSize
CharUnits BlockHeaderForcedGapSize
Definition: CGBlocks.h:288
CGCall.h
clang::CodeGen::operator|
BlockFlags operator|(BlockLiteralFlags l, BlockLiteralFlags r)
Definition: CGBlocks.h:83
clang::CodeGen::CGBlockInfo::CanBeGlobal
bool CanBeGlobal
CanBeGlobal - True if the block can be global, i.e.
Definition: CGBlocks.h:242
clang::CodeGen::BlockByrefInfo::Type
llvm::StructType * Type
Definition: CGBlocks.h:138
clang::CodeGen::BLOCK_BYREF_CURRENT_MAX
@ BLOCK_BYREF_CURRENT_MAX
Definition: CGBlocks.h:99
clang::BlockDecl
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:4283
CGValue.h
clang::CodeGen::CGBlockInfo::Block
const BlockDecl * Block
Definition: CGBlocks.h:276
clang::CodeGen::CGBlockInfo::StructureType
llvm::StructType * StructureType
Definition: CGBlocks.h:275
clang::CodeGen::BLOCK_IS_GLOBAL
@ BLOCK_IS_GLOBAL
Definition: CGBlocks.h:52
clang::CodeGen::BlockFlags::BlockFlags
BlockFlags()
Definition: CGBlocks.h:62
clang::CharUnits::fromQuantity
static CharUnits fromQuantity(QuantityType Quantity)
fromQuantity - Construct a CharUnits quantity from a raw integer type.
Definition: CharUnits.h:63
clang::BlockExpr::getBlockDecl
const BlockDecl * getBlockDecl() const
Definition: Expr.h:5987
clang::CodeGen::CGBlockInfo::Capture::getOffset
CharUnits getOffset() const
Definition: CGBlocks.h:182
clang::CodeGen::CGBlockInfo::Capture::makeIndex
static Capture makeIndex(unsigned index, CharUnits offset, QualType FieldType, BlockCaptureEntityKind CopyKind, BlockFieldFlags CopyFlags, BlockCaptureEntityKind DisposeKind, BlockFieldFlags DisposeFlags, const BlockDecl::Capture *Cap)
Definition: CGBlocks.h:205
clang::CodeGen::CGBlockInfo::Capture::DisposeFlags
BlockFieldFlags DisposeFlags
Definition: CGBlocks.h:236
clang::CodeGen::BLOCK_BYREF_CALLER
@ BLOCK_BYREF_CALLER
Definition: CGBlocks.h:97
clang::CodeGen::BLOCK_HAS_COPY_DISPOSE
@ BLOCK_HAS_COPY_DISPOSE
Definition: CGBlocks.h:50
uintptr_t
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
Definition: opencl-c-base.h:140
Type.h
clang::CodeGen::CGBlockInfo::Name
StringRef Name
Name - The name of the block, kindof.
Definition: CGBlocks.h:159
Expr.h
clang::CodeGen::BlockFieldFlags::BlockFieldFlags
BlockFieldFlags(BlockFieldFlag_t flag)
Definition: CGBlocks.h:108
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:906
clang::CodeGen::BlockCaptureEntityKind::CXXRecord
@ CXXRecord
clang::CodeGen::CGBlockInfo::CXXThisIndex
unsigned CXXThisIndex
The field index of 'this' within the block, if there is one.
Definition: CGBlocks.h:162
clang::dataflow::var
static constexpr Variable var(Literal L)
Returns the variable of L.
Definition: WatchedLiteralsSolver.cpp:71
clang::CodeGen::BlockFieldFlags::getBitMask
uint32_t getBitMask() const
Definition: CGBlocks.h:110
clang::CodeGen::BlockFlags
Definition: CGBlocks.h:57
clang::CodeGen::BlockCaptureEntityKind::BlockObject
@ BlockObject
clang::CodeGen::BlockFieldFlags
Definition: CGBlocks.h:102
ExprObjC.h
ExprCXX.h
clang::CodeGen::Address
An aligned address.
Definition: Address.h:74
clang::CodeGen::CGBlockInfo::HasCXXObject
bool HasCXXObject
HasCXXObject - True if the block's custom copy/dispose functions need to be run even in GC mode.
Definition: CGBlocks.h:253
clang::CodeGen::BLOCK_FIELD_IS_BLOCK
@ BLOCK_FIELD_IS_BLOCK
Definition: CGBlocks.h:90
clang::CodeGen::BlockFlags::operator&
friend bool operator&(BlockFlags l, BlockFlags r)
Definition: CGBlocks.h:76
CharUnits.h
clang::CodeGen::BLOCK_BYREF_LAYOUT_STRONG
@ BLOCK_BYREF_LAYOUT_STRONG
Definition: CGBlocks.h:43
clang::CodeGen::CGBlockInfo::Capture::Cap
const BlockDecl::Capture * Cap
Definition: CGBlocks.h:237
clang::CodeGen::CGBlockInfo::Capture::isConstant
bool isConstant() const
Definition: CGBlocks.h:176
clang::CodeGen::BLOCK_FIELD_IS_BYREF
@ BLOCK_FIELD_IS_BYREF
Definition: CGBlocks.h:92
clang::CodeGen::BLOCK_FIELD_IS_ARC
@ BLOCK_FIELD_IS_ARC
Definition: CGBlocks.h:96
clang::CodeGen::BlockFlags::BlockFlags
BlockFlags(uint32_t flags)
Definition: CGBlocks.h:61
clang::CodeGen::CGBlockInfo::SortedCaptures
llvm::SmallVector< Capture, 4 > SortedCaptures
The block's captures. Non-constant captures are sorted by their offsets.
Definition: CGBlocks.h:272
clang::CodeGen::CGBlockInfo::Capture::getCleanup
EHScopeStack::stable_iterator getCleanup() const
Definition: CGBlocks.h:186
clang::BlockExpr
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition: Expr.h:5975
clang::CodeGen::CGBlockInfo::getBlockDecl
const BlockDecl * getBlockDecl() const
Definition: CGBlocks.h:310
Value
Value
Definition: UninitializedValues.cpp:103
clang::CodeGen::CGBlockInfo::Capture::makeConstant
static Capture makeConstant(llvm::Value *value, const BlockDecl::Capture *Cap)
Definition: CGBlocks.h:221
CGBuilder.h
clang::CodeGen::BlockFieldFlags::isSpecialPointer
bool isSpecialPointer() const
Answers whether the flags indicate that this field is an object or block pointer that requires _Block...
Definition: CGBlocks.h:115
CodeGenTypes.h
clang::CodeGen::BLOCK_IS_NOESCAPE
@ BLOCK_IS_NOESCAPE
Definition: CGBlocks.h:49
clang::CodeGen::CGBlockInfo::Capture::getIndex
unsigned getIndex() const
Definition: CGBlocks.h:178
clang::CodeGen::CGBlockInfo::Capture::fieldType
QualType fieldType() const
Definition: CGBlocks.h:200
clang::CodeGen::CGBlockInfo::BlockHeaderForcedGapOffset
CharUnits BlockHeaderForcedGapOffset
Definition: CGBlocks.h:285
clang::CodeGen::BlockFieldFlags::operator==
bool operator==(BlockFieldFlags Other) const
Definition: CGBlocks.h:127
clang::CodeGen::BLOCK_FIELD_IS_WEAK
@ BLOCK_FIELD_IS_WEAK
Definition: CGBlocks.h:94
clang::CodeGen::BlockFlags::BlockFlags
BlockFlags(BlockByrefFlags flag)
Definition: CGBlocks.h:64
clang::CodeGen::BLOCK_BYREF_LAYOUT_WEAK
@ BLOCK_BYREF_LAYOUT_WEAK
Definition: CGBlocks.h:44
clang
Definition: CalledOnceCheck.h:17
clang::CodeGen::BLOCK_FIELD_IS_OBJECT
@ BLOCK_FIELD_IS_OBJECT
Definition: CGBlocks.h:88
clang::CodeGen::CGBlockInfo::NextBlockInfo
CGBlockInfo * NextBlockInfo
The next block in the block-info chain.
Definition: CGBlocks.h:294
clang::CodeGen::BlockCaptureEntityKind
BlockCaptureEntityKind
Represents a type of copy/destroy operation that should be performed for an entity that's captured by...
Definition: CGBlocks.h:146
clang::CodeGen::BLOCK_BYREF_LAYOUT_MASK
@ BLOCK_BYREF_LAYOUT_MASK
Definition: CGBlocks.h:40
clang::CodeGen::CGBlockInfo::Capture::isConstantOrTrivial
bool isConstantOrTrivial() const
Definition: CGBlocks.h:229
clang::CodeGen::CGBlockInfo::Capture::CopyFlags
BlockFieldFlags CopyFlags
Definition: CGBlocks.h:236
clang::CodeGen::BLOCK_HAS_SIGNATURE
@ BLOCK_HAS_SIGNATURE
Definition: CGBlocks.h:54
clang::CodeGen::BlockCaptureEntityKind::NonTrivialCStruct
@ NonTrivialCStruct
clang::CodeGen::CGBlockInfo::buildCaptureMap
void buildCaptureMap()
Definition: CGBlocks.h:296
clang::CodeGen::CGBlockInfo::getBlockExpr
const BlockExpr * getBlockExpr() const
Definition: CGBlocks.h:311
clang::CodeGen::BlockFlags::getBitMask
uint32_t getBitMask() const
Definition: CGBlocks.h:66
v
do v
Definition: arm_acle.h:76
clang::CharUnits
CharUnits - This is an opaque type for sizes expressed in character units.
Definition: CharUnits.h:38
clang::CodeGen::BlockCaptureEntityKind::ARCStrong
@ ARCStrong
clang::CodeGen::CGBlockInfo::Capture::getConstant
llvm::Value * getConstant() const
Definition: CGBlocks.h:195
clang::BlockDecl::Capture
A class which contains all the information about a particular captured value.
Definition: Decl.h:4289
clang::CodeGen::BlockByrefInfo::FieldOffset
CharUnits FieldOffset
Definition: CGBlocks.h:141
clang::CodeGen::BlockFlags::empty
bool empty() const
Definition: CGBlocks.h:67
clang::CodeGen::BlockByrefFlags
BlockByrefFlags
Definition: CGBlocks.h:38
clang::CodeGen::CGBlockInfo::BlockSize
CharUnits BlockSize
Definition: CGBlocks.h:278
clang::format::cleanup
tooling::Replacements cleanup(const FormatStyle &Style, StringRef Code, ArrayRef< tooling::Range > Ranges, StringRef FileName="<stdin>")
Clean up any erroneous/redundant code in the given Ranges in Code.
Definition: Format.cpp:3494
clang::CodeGen::CGBlockInfo::Captures
llvm::DenseMap< const VarDecl *, Capture * > Captures
Mapping from variables to pointers to captures in SortedCaptures.
Definition: CGBlocks.h:269
clang::CodeGen::BlockFieldFlags::empty
bool empty() const
Definition: CGBlocks.h:111
clang::CodeGen::CGBlockInfo::CapturesNonExternalType
bool CapturesNonExternalType
Indicates whether an object of a non-external C++ class is captured.
Definition: CGBlocks.h:266
clang::CharUnits::getQuantity
QuantityType getQuantity() const
getQuantity - Get the raw integer representation of this quantity.
Definition: CharUnits.h:179
clang::CodeGen::EHScopeStack::stable_iterator
A saved depth on the scope stack.
Definition: EHScopeStack.h:101
clang::CodeGen::CGBlockInfo::NoEscape
bool NoEscape
Indicates whether the block is non-escaping.
Definition: CGBlocks.h:249