summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp2
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp3
-rw-r--r--clang/lib/CodeGen/CGExprAgg.cpp4
-rw-r--r--clang/lib/CodeGen/CGExprComplex.cpp2
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp10
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp2
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp2
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp6
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h4
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp14
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h8
11 files changed, 28 insertions, 29 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 66d4e60c965..1b6a3ff8a3d 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -427,7 +427,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) {
if (V)
return RValue::get(V);
- WarnUnsupported(E, "builtin function");
+ ErrorUnsupported(E, "builtin function");
// Unknown builtin, for now just dump it out and return undef.
if (hasAggregateLLVMType(E->getType()))
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index e6bc5016e9a..4a802692306 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -90,8 +90,7 @@ unsigned CodeGenFunction::getAccessedFieldNo(unsigned Idx,
LValue CodeGenFunction::EmitLValue(const Expr *E) {
switch (E->getStmtClass()) {
default: {
- printf("Statement class: %d\n", E->getStmtClass());
- WarnUnsupported(E, "l-value expression");
+ ErrorUnsupported(E, "l-value expression");
llvm::Type *Ty = llvm::PointerType::getUnqual(ConvertType(E->getType()));
return LValue::MakeAddr(llvm::UndefValue::get(Ty),
E->getType().getCVRQualifiers());
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index 5fa7ef5c524..019d7be50c8 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/lib/CodeGen/CGExprAgg.cpp
@@ -60,7 +60,7 @@ public:
//===--------------------------------------------------------------------===//
void VisitStmt(Stmt *S) {
- CGF.WarnUnsupported(S, "aggregate expression");
+ CGF.ErrorUnsupported(S, "aggregate expression");
}
void VisitParenExpr(ParenExpr *PE) { Visit(PE->getSubExpr()); }
@@ -235,7 +235,7 @@ void AggExprEmitter::VisitStmtExpr(const StmtExpr *E) {
}
void AggExprEmitter::VisitBinaryOperator(const BinaryOperator *E) {
- CGF.WarnUnsupported(E, "aggregate binary expression");
+ CGF.ErrorUnsupported(E, "aggregate binary expression");
}
void AggExprEmitter::VisitBinAssign(const BinaryOperator *E) {
diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp
index dacbd865c3d..ba384e7f4ff 100644
--- a/clang/lib/CodeGen/CGExprComplex.cpp
+++ b/clang/lib/CodeGen/CGExprComplex.cpp
@@ -228,7 +228,7 @@ void ComplexExprEmitter::EmitStoreOfComplex(ComplexPairTy Val, llvm::Value *Ptr,
//===----------------------------------------------------------------------===//
ComplexPairTy ComplexExprEmitter::VisitExpr(Expr *E) {
- CGF.WarnUnsupported(E, "complex expression");
+ CGF.ErrorUnsupported(E, "complex expression");
const llvm::Type *EltTy =
CGF.ConvertType(E->getType()->getAsComplexType()->getElementType());
llvm::Value *U = llvm::UndefValue::get(EltTy);
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index dfd047c89dc..ec6a75f3569 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -39,7 +39,7 @@ public:
//===--------------------------------------------------------------------===//
llvm::Constant *VisitStmt(Stmt *S) {
- CGM.WarnUnsupported(S, "constant expression");
+ CGM.ErrorUnsupported(S, "constant expression");
QualType T = cast<Expr>(S)->getType();
return llvm::UndefValue::get(CGM.getTypes().ConvertType(T));
}
@@ -129,7 +129,7 @@ public:
llvm::Constant *C = Visit(E);
llvm::ConstantInt *CI = dyn_cast<llvm::ConstantInt>(C);
if (!CI) {
- CGM.WarnUnsupported(E, "bitfield initialization");
+ CGM.ErrorUnsupported(E, "bitfield initialization");
return;
}
llvm::APInt V = CI->getValue();
@@ -541,7 +541,7 @@ public:
} else if (LHS->getType()->isFloatingPoint()) {
Result = llvm::ConstantExpr::getFCmp(FloatPred, LHS, RHS);
} else {
- CGM.WarnUnsupported(E, "constant expression");
+ CGM.ErrorUnsupported(E, "constant expression");
Result = llvm::ConstantInt::getFalse();
}
@@ -584,7 +584,7 @@ public:
llvm::Constant *CondVal = EmitConversionToBool(Cond, E->getType());
llvm::ConstantInt *CondValInt = dyn_cast<llvm::ConstantInt>(CondVal);
if (!CondValInt) {
- CGM.WarnUnsupported(E, "constant expression");
+ CGM.ErrorUnsupported(E, "constant expression");
return llvm::Constant::getNullValue(ConvertType(E->getType()));
}
if (CondValInt->isOne()) {
@@ -789,7 +789,7 @@ public:
break;
}
}
- CGM.WarnUnsupported(E, "constant l-value expression");
+ CGM.ErrorUnsupported(E, "constant l-value expression");
llvm::Type *Ty = llvm::PointerType::getUnqual(ConvertType(E->getType()));
return llvm::UndefValue::get(Ty);
}
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index ff7a20aea71..e408e9ff9ed 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -453,7 +453,7 @@ EmitComplexToScalarConversion(CodeGenFunction::ComplexPairTy Src,
//===----------------------------------------------------------------------===//
Value *ScalarExprEmitter::VisitExpr(Expr *E) {
- CGF.WarnUnsupported(E, "scalar expression");
+ CGF.ErrorUnsupported(E, "scalar expression");
if (E->getType()->isVoidType())
return 0;
return llvm::UndefValue::get(CGF.ConvertType(E->getType()));
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index bfcddd2df35..daad0626196 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -52,7 +52,7 @@ void CodeGenFunction::EmitStmt(const Stmt *S) {
else
EmitAggExpr(E, 0, false);
} else {
- WarnUnsupported(S, "statement");
+ ErrorUnsupported(S, "statement");
}
break;
case Stmt::NullStmtClass: break;
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index d02c860a102..af63be73fe9 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -173,10 +173,10 @@ const CGRecordLayout *CodeGenFunction::getCGRecordLayout(CodeGenTypes &CGT,
return CGT.getCGRecordLayout(RTy->getDecl());
}
-/// WarnUnsupported - Print out a warning that codegen doesn't support the
+/// ErrorUnsupported - Print out an error that codegen doesn't support the
/// specified stmt yet.
-void CodeGenFunction::WarnUnsupported(const Stmt *S, const char *Type) {
- CGM.WarnUnsupported(S, Type);
+void CodeGenFunction::ErrorUnsupported(const Stmt *S, const char *Type) {
+ CGM.ErrorUnsupported(S, Type);
}
unsigned CodeGenFunction::GetIDForAddrOfLabel(const LabelStmt *L) {
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 45f239ac24f..b595363ff08 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -315,9 +315,9 @@ public:
void EmitBlock(llvm::BasicBlock *BB);
- /// WarnUnsupported - Print out a warning that codegen doesn't support the
+ /// ErrorUnsupported - Print out an error that codegen doesn't support the
/// specified stmt yet.
- void WarnUnsupported(const Stmt *S, const char *Type);
+ void ErrorUnsupported(const Stmt *S, const char *Type);
//===--------------------------------------------------------------------===//
// Helpers
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 99390c1135c..18672072480 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -65,10 +65,10 @@ void CodeGenModule::Release() {
assert(!verifyModule(TheModule));
}
-/// WarnUnsupported - Print out a warning that codegen doesn't support the
+/// ErrorUnsupported - Print out an error that codegen doesn't support the
/// specified stmt yet.
-void CodeGenModule::WarnUnsupported(const Stmt *S, const char *Type) {
- unsigned DiagID = getDiags().getCustomDiagID(Diagnostic::Warning,
+void CodeGenModule::ErrorUnsupported(const Stmt *S, const char *Type) {
+ unsigned DiagID = getDiags().getCustomDiagID(Diagnostic::Error,
"cannot codegen this %0 yet");
SourceRange Range = S->getSourceRange();
std::string Msg = Type;
@@ -76,10 +76,10 @@ void CodeGenModule::WarnUnsupported(const Stmt *S, const char *Type) {
&Msg, 1, &Range, 1);
}
-/// WarnUnsupported - Print out a warning that codegen doesn't support the
+/// ErrorUnsupported - Print out an error that codegen doesn't support the
/// specified decl yet.
-void CodeGenModule::WarnUnsupported(const Decl *D, const char *Type) {
- unsigned DiagID = getDiags().getCustomDiagID(Diagnostic::Warning,
+void CodeGenModule::ErrorUnsupported(const Decl *D, const char *Type) {
+ unsigned DiagID = getDiags().getCustomDiagID(Diagnostic::Error,
"cannot codegen this %0 yet");
std::string Msg = Type;
getDiags().Report(Context.getFullLoc(D->getLocation()), DiagID,
@@ -888,7 +888,7 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
case Decl::LinkageSpec: {
LinkageSpecDecl *LSD = cast<LinkageSpecDecl>(D);
if (LSD->getLanguage() == LinkageSpecDecl::lang_cxx)
- WarnUnsupported(LSD, "linkage spec");
+ ErrorUnsupported(LSD, "linkage spec");
// FIXME: implement C++ linkage, C linkage works mostly by C
// language reuse already.
break;
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 5f3714cb283..81882515a6c 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -188,13 +188,13 @@ public:
llvm::Constant *EmitAnnotateAttr(llvm::GlobalValue *GV,
const AnnotateAttr *AA, unsigned LineNo);
- /// WarnUnsupported - Print out a warning that codegen doesn't support the
+ /// ErrorUnsupported - Print out an error that codegen doesn't support the
/// specified stmt yet.
- void WarnUnsupported(const Stmt *S, const char *Type);
+ void ErrorUnsupported(const Stmt *S, const char *Type);
- /// WarnUnsupported - Print out a warning that codegen doesn't support the
+ /// ErrorUnsupported - Print out an error that codegen doesn't support the
/// specified decl yet.
- void WarnUnsupported(const Decl *D, const char *Type);
+ void ErrorUnsupported(const Decl *D, const char *Type);
private:
void SetFunctionAttributes(const FunctionDecl *FD,
OpenPOWER on IntegriCloud