forked from OSchip/llvm-project
When dumping out errors about unsupported stuff, emit loc info.
llvm-svn: 41907
This commit is contained in:
parent
5a5b35c07b
commit
69de3f4af6
|
@ -28,7 +28,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) {
|
|||
return EmitCallExpr(CGM.getBuiltinLibFunction(BuiltinID), E);
|
||||
|
||||
fprintf(stderr, "Unimplemented builtin!!\n");
|
||||
E->dump();
|
||||
E->dump(getContext().SourceMgr);
|
||||
|
||||
// Unknown builtin, for now just dump it out and return undef.
|
||||
if (hasAggregateLLVMType(E->getType()))
|
||||
|
|
|
@ -84,7 +84,7 @@ LValue CodeGenFunction::EmitLValue(const Expr *E) {
|
|||
switch (E->getStmtClass()) {
|
||||
default: {
|
||||
fprintf(stderr, "Unimplemented lvalue expr!\n");
|
||||
E->dump();
|
||||
E->dump(getContext().SourceMgr);
|
||||
llvm::Type *Ty = llvm::PointerType::get(ConvertType(E->getType()));
|
||||
return LValue::MakeAddr(llvm::UndefValue::get(Ty));
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
void VisitStmt(Stmt *S) {
|
||||
fprintf(stderr, "Unimplemented agg expr!\n");
|
||||
S->dump();
|
||||
S->dump(CGF.getContext().SourceMgr);
|
||||
}
|
||||
void VisitParenExpr(ParenExpr *PE) { Visit(PE->getSubExpr()); }
|
||||
|
||||
|
@ -135,7 +135,7 @@ void AggExprEmitter::VisitStmtExpr(const StmtExpr *E) {
|
|||
|
||||
void AggExprEmitter::VisitBinaryOperator(const BinaryOperator *E) {
|
||||
fprintf(stderr, "Unimplemented aggregate binary expr!\n");
|
||||
E->dump();
|
||||
E->dump(CGF.getContext().SourceMgr);
|
||||
}
|
||||
|
||||
void AggExprEmitter::VisitBinAssign(const BinaryOperator *E) {
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
//===--------------------------------------------------------------------===//
|
||||
|
||||
ComplexPairTy VisitStmt(Stmt *S) {
|
||||
S->dump();
|
||||
S->dump(CGF.getContext().SourceMgr);
|
||||
assert(0 && "Stmt can't have complex result type!");
|
||||
return ComplexPairTy();
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ void ComplexExprEmitter::EmitStoreOfComplex(ComplexPairTy Val, llvm::Value *Ptr,
|
|||
|
||||
ComplexPairTy ComplexExprEmitter::VisitExpr(Expr *E) {
|
||||
fprintf(stderr, "Unimplemented complex expr!\n");
|
||||
E->dump();
|
||||
E->dump(CGF.getContext().SourceMgr);
|
||||
const llvm::Type *EltTy =
|
||||
CGF.ConvertType(E->getType()->getAsComplexType()->getElementType());
|
||||
llvm::Value *U = llvm::UndefValue::get(EltTy);
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
//===--------------------------------------------------------------------===//
|
||||
|
||||
Value *VisitStmt(Stmt *S) {
|
||||
S->dump();
|
||||
S->dump(CGF.getContext().SourceMgr);
|
||||
assert(0 && "Stmt can't have complex result type!");
|
||||
return 0;
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ EmitComplexToScalarConversion(CodeGenFunction::ComplexPairTy Src,
|
|||
|
||||
Value *ScalarExprEmitter::VisitExpr(Expr *E) {
|
||||
fprintf(stderr, "Unimplemented scalar expr!\n");
|
||||
E->dump();
|
||||
E->dump(CGF.getContext().SourceMgr);
|
||||
if (E->getType()->isVoidType())
|
||||
return 0;
|
||||
return llvm::UndefValue::get(CGF.ConvertType(E->getType()));
|
||||
|
|
|
@ -39,7 +39,7 @@ void CodeGenFunction::EmitStmt(const Stmt *S) {
|
|||
EmitAggExpr(E, 0, false);
|
||||
} else {
|
||||
printf("Unimplemented stmt!\n");
|
||||
S->dump();
|
||||
S->dump(getContext().SourceMgr);
|
||||
}
|
||||
break;
|
||||
case Stmt::NullStmtClass: break;
|
||||
|
|
Loading…
Reference in New Issue