} // end clang namespace
#endif
-
\ No newline at end of file
+
} // end clang namespace
#endif
-
\ No newline at end of file
+
return RValue::get(llvm::ConstantInt::get(VMContext,
Result.Val.getInt()));
else if (Result.Val.isFloat())
- return RValue::get(VMContext.getConstantFP(Result.Val.getFloat()));
+ return RValue::get(ConstantFP::get(VMContext, Result.Val.getFloat()));
}
switch (BuiltinID) {
ComplexPairTy ComplexExprEmitter::VisitPrePostIncDec(const UnaryOperator *E,
bool isInc, bool isPre) {
- llvm::LLVMContext &VMContext = CGF.getLLVMContext();
-
LValue LV = CGF.EmitLValue(E->getSubExpr());
ComplexPairTy InVal = EmitLoadOfComplex(LV.getAddress(),
LV.isVolatileQualified());
llvm::APFloat FVal(CGF.getContext().getFloatTypeSemantics(ElemTy), 1);
if (!isInc)
FVal.changeSign();
- NextVal = VMContext.getConstantFP(FVal);
+ NextVal = llvm::ConstantFP::get(CGF.getLLVMContext(), FVal);
// Add the inc/dec to the real part.
NextVal = Builder.CreateFAdd(InVal.first, NextVal, isInc ? "inc" : "dec");
return VMContext.getConstantStruct(Complex, 2);
}
case APValue::Float:
- return VMContext.getConstantFP(Result.Val.getFloat());
+ return llvm::ConstantFP::get(VMContext, Result.Val.getFloat());
case APValue::ComplexFloat: {
llvm::Constant *Complex[2];
- Complex[0] = VMContext.getConstantFP(Result.Val.getComplexFloatReal());
- Complex[1] = VMContext.getConstantFP(Result.Val.getComplexFloatImag());
+ Complex[0] = llvm::ConstantFP::get(VMContext,
+ Result.Val.getComplexFloatReal());
+ Complex[1] = llvm::ConstantFP::get(VMContext,
+ Result.Val.getComplexFloatImag());
return VMContext.getConstantStruct(Complex, 2);
}
if (Elt.isInt())
Inits.push_back(llvm::ConstantInt::get(VMContext, Elt.getInt()));
else
- Inits.push_back(VMContext.getConstantFP(Elt.getFloat()));
+ Inits.push_back(llvm::ConstantFP::get(VMContext, Elt.getFloat()));
}
return VMContext.getConstantVector(&Inits[0], Inits.size());
}
return llvm::ConstantInt::get(VMContext, E->getValue());
}
Value *VisitFloatingLiteral(const FloatingLiteral *E) {
- return VMContext.getConstantFP(E->getValue());
+ return llvm::ConstantFP::get(VMContext, E->getValue());
}
Value *VisitCharacterLiteral(const CharacterLiteral *E) {
return llvm::ConstantInt::get(ConvertType(E->getType()), E->getValue());
// Add the inc/dec to the real part.
if (InVal->getType() == llvm::Type::FloatTy)
NextVal =
- VMContext.getConstantFP(llvm::APFloat(static_cast<float>(AmountVal)));
+ llvm::ConstantFP::get(VMContext,
+ llvm::APFloat(static_cast<float>(AmountVal)));
else if (InVal->getType() == llvm::Type::DoubleTy)
NextVal =
- VMContext.getConstantFP(llvm::APFloat(static_cast<double>(AmountVal)));
+ llvm::ConstantFP::get(VMContext,
+ llvm::APFloat(static_cast<double>(AmountVal)));
else {
llvm::APFloat F(static_cast<float>(AmountVal));
bool ignored;
F.convert(CGF.Target.getLongDoubleFormat(), llvm::APFloat::rmTowardZero,
&ignored);
- NextVal = VMContext.getConstantFP(F);
+ NextVal = llvm::ConstantFP::get(VMContext, F);
}
NextVal = Builder.CreateFAdd(InVal, NextVal, isInc ? "inc" : "dec");
}
static void f() { }
};
-}
\ No newline at end of file
+}
int (*f0b)(int, int) = &f0;
int (*f0c)(int, float) = f0; // expected-error{{incompatible type}}
// FIXME: poor error message above!
-}
\ No newline at end of file
+}
inner2.x = &i;
inner2.y = &f;
inner2.f(); // expected-note{{instantiation}}
-}
\ No newline at end of file
+}
};
template<typename T>
-typename X0<T>::size_type X0<T>::f0() const { }
\ No newline at end of file
+typename X0<T>::size_type X0<T>::f0() const { }
void test_f(X0<float, int> xfi, X0<void, int> xvi, float *fp, void *vp, int i) {
xfi.f(fp, i);
xvi.f(vp, i); // expected-note{{instantiation}}
-}
\ No newline at end of file
+}
CannotInit &returnError() {
return X<CannotInit>::value; // expected-note{{instantiation}}
-}
\ No newline at end of file
+}
return X0<X2>::value; // expected-note{{instantiation}}
}
-template<typename T> T x; // expected-error{{variable 'x' declared as a template}}
\ No newline at end of file
+template<typename T> T x; // expected-error{{variable 'x' declared as a template}}
f<int>("aa",3.0); // Y is deduced to be char*, and
// Z is deduced to be double
f("aa",3.0); // expected-error{{no matching}}
-}
\ No newline at end of file
+}
float (*f1d)(float) = (f1);
float (*f1e)(float) = &f1;
float (*f1f)(float) = (&f1);
-}
\ No newline at end of file
+}
// FIXME: should be "_Z4nextIdiEPT_S1_RKT0_"
// RUN: grep "_Z4nextIdiEPdPdRKi" %t
dptr = next(dptr, diff);
-}
\ No newline at end of file
+}
char* cp2 = add(cp, i);
add(cp, cp); // expected-note{{instantiation of}}
(void)sizeof(add(ip, ip));
-}
\ No newline at end of file
+}