@@ -155,6 +155,7 @@ class Function final {
155
155
156
156
// / Checks if the function is virtual.
157
157
bool isVirtual () const { return Virtual; };
158
+ bool isImmediate () const { return Immediate; }
158
159
159
160
// / Checks if the function is a constructor.
160
161
bool isConstructor () const { return Kind == FunctionKind::Ctor; }
@@ -276,22 +277,32 @@ class Function final {
276
277
// / List of parameter offsets.
277
278
llvm::SmallVector<unsigned , 8 > ParamOffsets;
278
279
// / Flag to indicate if the function is valid.
279
- bool IsValid = false ;
280
+ LLVM_PREFERRED_TYPE (bool )
281
+ unsigned IsValid : 1 ;
280
282
// / Flag to indicate if the function is done being
281
283
// / compiled to bytecode.
282
- bool IsFullyCompiled = false ;
284
+ LLVM_PREFERRED_TYPE (bool )
285
+ unsigned IsFullyCompiled : 1 ;
283
286
// / Flag indicating if this function takes the this pointer
284
287
// / as the first implicit argument
285
- bool HasThisPointer = false ;
288
+ LLVM_PREFERRED_TYPE (bool )
289
+ unsigned HasThisPointer : 1 ;
286
290
// / Whether this function has Return Value Optimization, i.e.
287
291
// / the return value is constructed in the caller's stack frame.
288
292
// / This is done for functions that return non-primive values.
289
- bool HasRVO = false ;
293
+ LLVM_PREFERRED_TYPE (bool )
294
+ unsigned HasRVO : 1 ;
290
295
// / If we've already compiled the function's body.
291
- bool HasBody = false ;
292
- bool Defined = false ;
293
- bool Variadic = false ;
294
- bool Virtual = false ;
296
+ LLVM_PREFERRED_TYPE (bool )
297
+ unsigned HasBody : 1 ;
298
+ LLVM_PREFERRED_TYPE (bool )
299
+ unsigned Defined : 1 ;
300
+ LLVM_PREFERRED_TYPE (bool )
301
+ unsigned Variadic : 1 ;
302
+ LLVM_PREFERRED_TYPE (bool )
303
+ unsigned Virtual : 1 ;
304
+ LLVM_PREFERRED_TYPE (bool )
305
+ unsigned Immediate : 1 ;
295
306
296
307
public:
297
308
// / Dumps the disassembled bytecode to \c llvm::errs().
0 commit comments