Lines Matching defs:constant

137       // some variables even if we can constant-evaluate them because
138 // we can't guarantee every translation unit will constant-evaluate them.
235 // If constant emission failed, then this should be a C++ static
239 CGM.ErrorUnsupported(D.getInit(), "constant l-value expression");
242 // be constant.
281 // We have a constant initializer, but a nontrivial destructor. We still
337 // We may have to cast the constant because of the initializer
341 // RAUW's the GV uses of this constant will be invalid.
780 /// from a constant global. It is beneficial to use memset if the global is all
849 // constant initializer, there are optimizations we can do.
851 // TODO: We should constant-evaluate the initializer of any variable,
852 // as long as it is initialized by a constant expression. Currently,
1054 // If this was emitted as a global constant, we're done.
1087 llvm::Constant *constant = 0;
1089 assert(!capturedByInit && "constant init contains a capturing block?");
1090 constant = CGM.EmitConstantInit(D, this);
1093 if (!constant) {
1103 return EmitStoreThroughLValue(RValue::get(constant), lv, true);
1120 if (shouldUseMemSetPlusStoresToInitialize(constant,
1121 CGM.getDataLayout().getTypeAllocSize(constant->getType()))) {
1125 if (!constant->isNullValue() && !isa<llvm::UndefValue>(constant)) {
1126 Loc = Builder.CreateBitCast(Loc, constant->getType()->getPointerTo());
1127 emitStoresForInitAfterMemset(constant, Loc, isVolatile, Builder);
1134 new llvm::GlobalVariable(CGM.getModule(), constant->getType(), true,
1136 constant, Name);
1261 // If this was emitted as a global constant, we're done.
1391 // But if the array length is constant, we can suppress that.
1393 // ...and if it's constant zero, we can just skip the entire thing.