summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/Analysis/PathSensitive/Checker.h2
-rw-r--r--clang/include/clang/Analysis/PathSensitive/CheckerVisitor.h2
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp2
-rw-r--r--clang/lib/CodeGen/CGExprComplex.cpp4
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp10
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp10
-rw-r--r--clang/test/CXX/class/class.local/p4.cpp2
-rw-r--r--clang/test/CXX/over/over.over/p2.cpp2
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp2
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp2
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp2
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp2
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp2
-rw-r--r--clang/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp2
-rw-r--r--clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp2
-rw-r--r--clang/test/CodeGenCXX/function-template-specialization.cpp2
-rw-r--r--clang/test/SemaTemplate/implicit-instantiation-1.cpp2
17 files changed, 27 insertions, 25 deletions
diff --git a/clang/include/clang/Analysis/PathSensitive/Checker.h b/clang/include/clang/Analysis/PathSensitive/Checker.h
index d432086e6e2..611a135e6c1 100644
--- a/clang/include/clang/Analysis/PathSensitive/Checker.h
+++ b/clang/include/clang/Analysis/PathSensitive/Checker.h
@@ -100,4 +100,4 @@ public:
} // end clang namespace
#endif
- \ No newline at end of file
+
diff --git a/clang/include/clang/Analysis/PathSensitive/CheckerVisitor.h b/clang/include/clang/Analysis/PathSensitive/CheckerVisitor.h
index 91db783a535..72fd5f3dabb 100644
--- a/clang/include/clang/Analysis/PathSensitive/CheckerVisitor.h
+++ b/clang/include/clang/Analysis/PathSensitive/CheckerVisitor.h
@@ -51,4 +51,4 @@ void PreVisit ## NAME(CheckerContext &C, const NAME* S) {}
} // end clang namespace
#endif
- \ No newline at end of file
+
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index ffd19e371d9..86650a1e7e6 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -66,7 +66,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
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) {
diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp
index 445efe8864b..87b45d3af95 100644
--- a/clang/lib/CodeGen/CGExprComplex.cpp
+++ b/clang/lib/CodeGen/CGExprComplex.cpp
@@ -367,8 +367,6 @@ ComplexPairTy ComplexExprEmitter::EmitCast(Expr *Op, QualType DestTy) {
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());
@@ -386,7 +384,7 @@ ComplexPairTy ComplexExprEmitter::VisitPrePostIncDec(const UnaryOperator *E,
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");
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index a64fb09eca1..36c3256a2f3 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -879,12 +879,14 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E,
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);
}
@@ -897,7 +899,7 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E,
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());
}
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index b80b64ccced..141d39359a0 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -112,7 +112,7 @@ public:
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());
@@ -731,16 +731,18 @@ Value *ScalarExprEmitter::VisitPrePostIncDec(const UnaryOperator *E,
// 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");
}
diff --git a/clang/test/CXX/class/class.local/p4.cpp b/clang/test/CXX/class/class.local/p4.cpp
index 40702ad9689..f2432ec9739 100644
--- a/clang/test/CXX/class/class.local/p4.cpp
+++ b/clang/test/CXX/class/class.local/p4.cpp
@@ -7,4 +7,4 @@ void f() {
static void f() { }
};
-} \ No newline at end of file
+}
diff --git a/clang/test/CXX/over/over.over/p2.cpp b/clang/test/CXX/over/over.over/p2.cpp
index adca33cc7c3..9ab02606189 100644
--- a/clang/test/CXX/over/over.over/p2.cpp
+++ b/clang/test/CXX/over/over.over/p2.cpp
@@ -7,4 +7,4 @@ void test_f0() {
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
+}
diff --git a/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp b/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp
index 9bafacc00a7..bc4bb5da401 100644
--- a/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp
@@ -24,4 +24,4 @@ void test(int i, float f) {
inner2.x = &i;
inner2.y = &f;
inner2.f(); // expected-note{{instantiation}}
-} \ No newline at end of file
+}
diff --git a/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp b/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp
index 8b70ded8ca6..0b9ea35d11b 100644
--- a/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp
@@ -9,4 +9,4 @@ struct X0 {
};
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 { }
diff --git a/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp b/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp
index c505823a32e..a09d0efa297 100644
--- a/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp
@@ -14,4 +14,4 @@ void X0<T, U>::f(T *t, const U &u) {
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
+}
diff --git a/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp b/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp
index b13ca937641..2ddb8eac6c0 100644
--- a/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp
@@ -25,4 +25,4 @@ unsigned long sizeOkay() { return sizeof(X<CannotInit>::value); }
CannotInit &returnError() {
return X<CannotInit>::value; // expected-note{{instantiation}}
-} \ No newline at end of file
+}
diff --git a/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp b/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp
index 37cae38cac6..949a8b0a72c 100644
--- a/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp
@@ -23,4 +23,4 @@ X2& get_X2() {
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}}
diff --git a/clang/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp b/clang/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp
index f4970b89f69..01030b2a8a2 100644
--- a/clang/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp
+++ b/clang/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp
@@ -8,4 +8,4 @@ void g() {
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
+}
diff --git a/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp b/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp
index 0a496392a82..86a34500ad4 100644
--- a/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp
+++ b/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp
@@ -19,4 +19,4 @@ void test_f1() {
float (*f1d)(float) = (f1);
float (*f1e)(float) = &f1;
float (*f1f)(float) = (&f1);
-} \ No newline at end of file
+}
diff --git a/clang/test/CodeGenCXX/function-template-specialization.cpp b/clang/test/CodeGenCXX/function-template-specialization.cpp
index bea3af2bb5a..1d3c5f65ec8 100644
--- a/clang/test/CodeGenCXX/function-template-specialization.cpp
+++ b/clang/test/CodeGenCXX/function-template-specialization.cpp
@@ -24,4 +24,4 @@ void test2(int *iptr, double *dptr, int diff) {
// FIXME: should be "_Z4nextIdiEPT_S1_RKT0_"
// RUN: grep "_Z4nextIdiEPdPdRKi" %t
dptr = next(dptr, diff);
-} \ No newline at end of file
+}
diff --git a/clang/test/SemaTemplate/implicit-instantiation-1.cpp b/clang/test/SemaTemplate/implicit-instantiation-1.cpp
index b8f9622001e..d04bbd84840 100644
--- a/clang/test/SemaTemplate/implicit-instantiation-1.cpp
+++ b/clang/test/SemaTemplate/implicit-instantiation-1.cpp
@@ -22,4 +22,4 @@ void test_add(char *cp, int i, int *ip) {
char* cp2 = add(cp, i);
add(cp, cp); // expected-note{{instantiation of}}
(void)sizeof(add(ip, ip));
-} \ No newline at end of file
+}
OpenPOWER on IntegriCloud