]> granicus.if.org Git - clang/commitdiff
When dumping out errors about unsupported stuff, emit loc info.
authorChris Lattner <sabre@nondot.org>
Thu, 13 Sep 2007 01:17:29 +0000 (01:17 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 13 Sep 2007 01:17:29 +0000 (01:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41907 91177308-0d34-0410-b5e6-96231b3b80d8

CodeGen/CGBuiltin.cpp
CodeGen/CGExpr.cpp
CodeGen/CGExprAgg.cpp
CodeGen/CGExprComplex.cpp
CodeGen/CGExprScalar.cpp
CodeGen/CGStmt.cpp

index 03b5c2d09c50fd0d291f8d31da68ef2fbce1ecb2..6dbd2725216b5fd084958f225043eb4ba2b82838 100644 (file)
@@ -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()))
index d5a5c3f2580592c4b45a26400e6f158130be0ae5..86604f94bfb4d8210f3777d957544c633ca8046b 100644 (file)
@@ -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));
   }
index 7ade133051192e246edc5b4f75d41a560da25ff9..de9e2b5f6f16a88fcb915d6567dab077a8f8f449 100644 (file)
@@ -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) {
index ec5a1bc71afed707bcfb408e15deb46635b789b5..067d2899ce61f651222709b26438f6e31a31512d 100644 (file)
@@ -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);
index 96203f04ba8c4e252b405da58537942f058abce9..9c2e55f6eae337c63eae9642b5c4fc77b1840d96 100644 (file)
@@ -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()));
index 3a4fd9576a6473b461cf7f3d17b996910bbd9f77..fa15c2e620ce0a3ca7304acc7dee85133d42633a 100644 (file)
@@ -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;