reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
5136 return Error(ID.Loc, "functions are not values, refer to them as pointers"); 5138 switch (ID.Kind) { 5140 if (!PFS) return Error(ID.Loc, "invalid use of function-local name"); 5141 V = PFS->GetVal(ID.UIntVal, Ty, ID.Loc, IsCall); 5141 V = PFS->GetVal(ID.UIntVal, Ty, ID.Loc, IsCall); 5144 if (!PFS) return Error(ID.Loc, "invalid use of function-local name"); 5145 V = PFS->GetVal(ID.StrVal, Ty, ID.Loc, IsCall); 5145 V = PFS->GetVal(ID.StrVal, Ty, ID.Loc, IsCall); 5148 if (!ID.FTy || !InlineAsm::Verify(ID.FTy, ID.StrVal2)) 5148 if (!ID.FTy || !InlineAsm::Verify(ID.FTy, ID.StrVal2)) 5148 if (!ID.FTy || !InlineAsm::Verify(ID.FTy, ID.StrVal2)) 5149 return Error(ID.Loc, "invalid type for inline asm constraint string"); 5150 V = InlineAsm::get(ID.FTy, ID.StrVal, ID.StrVal2, ID.UIntVal & 1, 5150 V = InlineAsm::get(ID.FTy, ID.StrVal, ID.StrVal2, ID.UIntVal & 1, 5150 V = InlineAsm::get(ID.FTy, ID.StrVal, ID.StrVal2, ID.UIntVal & 1, 5150 V = InlineAsm::get(ID.FTy, ID.StrVal, ID.StrVal2, ID.UIntVal & 1, 5151 (ID.UIntVal >> 1) & 1, 5152 (InlineAsm::AsmDialect(ID.UIntVal >> 2))); 5156 V = GetGlobalVal(ID.StrVal, Ty, ID.Loc, IsCall); 5156 V = GetGlobalVal(ID.StrVal, Ty, ID.Loc, IsCall); 5159 V = GetGlobalVal(ID.UIntVal, Ty, ID.Loc, IsCall); 5159 V = GetGlobalVal(ID.UIntVal, Ty, ID.Loc, IsCall); 5163 return Error(ID.Loc, "integer constant must have integer type"); 5164 ID.APSIntVal = ID.APSIntVal.extOrTrunc(Ty->getPrimitiveSizeInBits()); 5164 ID.APSIntVal = ID.APSIntVal.extOrTrunc(Ty->getPrimitiveSizeInBits()); 5165 V = ConstantInt::get(Context, ID.APSIntVal); 5169 !ConstantFP::isValueValidForType(Ty, ID.APFloatVal)) 5170 return Error(ID.Loc, "floating point constant invalid for type"); 5174 if (&ID.APFloatVal.getSemantics() == &APFloat::IEEEdouble()) { 5177 ID.APFloatVal.convert(APFloat::IEEEhalf(), APFloat::rmNearestTiesToEven, 5180 ID.APFloatVal.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven, 5183 V = ConstantFP::get(Context, ID.APFloatVal); 5186 return Error(ID.Loc, "floating point constant does not have type '" + 5192 return Error(ID.Loc, "null must be a pointer type"); 5198 return Error(ID.Loc, "invalid type for undef constant"); 5203 return Error(ID.Loc, "invalid empty array initializer"); 5209 return Error(ID.Loc, "invalid type for null constant"); 5214 return Error(ID.Loc, "invalid type for none constant"); 5218 if (ID.ConstantVal->getType() != Ty) 5219 return Error(ID.Loc, "constant expression type mismatch"); 5221 V = ID.ConstantVal; 5226 if (ST->getNumElements() != ID.UIntVal) 5227 return Error(ID.Loc, 5229 if (ST->isPacked() != (ID.Kind == ValID::t_PackedConstantStruct)) 5230 return Error(ID.Loc, "packed'ness of initializer and type don't match"); 5233 for (unsigned i = 0, e = ID.UIntVal; i != e; ++i) 5234 if (ID.ConstantStructElts[i]->getType() != ST->getElementType(i)) 5235 return Error(ID.Loc, "element " + Twine(i) + 5239 ST, makeArrayRef(ID.ConstantStructElts.get(), ID.UIntVal)); 5239 ST, makeArrayRef(ID.ConstantStructElts.get(), ID.UIntVal)); 5241 return Error(ID.Loc, "constant expression type mismatch");