friend class LLVMContextImpl;
friend class MDNode;
- unsigned Arg;
- unsigned Flags;
+ unsigned Arg : 16;
+ unsigned Flags : 16;
DILocalVariable(LLVMContext &C, StorageType Storage, unsigned Line,
unsigned Arg, unsigned Flags, ArrayRef<Metadata *> Ops)
: DIVariable(C, DILocalVariableKind, Storage, Line, Ops), Arg(Arg),
- Flags(Flags) {}
+ Flags(Flags) {
+ assert(Flags < ((1 << 16) - 1) && "DILocalVariable: Flags out of range");
+ assert(Arg < ((1 << 16) - 1) && "DILocalVariable: Arg out of range");
+ }
~DILocalVariable() = default;
static DILocalVariable *getImpl(LLVMContext &Context, DIScope *Scope,