[llvm-commits] [gcc-plugin] r76757 - /gcc-plugin/trunk/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Wed Jul 22 10:25:31 PDT 2009
Author: baldrick
Date: Wed Jul 22 12:25:31 2009
New Revision: 76757
URL: http://llvm.org/viewvc/llvm-project?rev=76757&view=rev
Log:
Don't pass an integer (the gimple code) to "<<",
it seems it offsets the stream rather than outputting
the value. Instead, let print_gimple_stmt take care
of giving all the details, by passing it the TDF_RAW
flag. Example output:
gimple_assign <plus_expr, D.2692_3, x_1(D), y_2(D)>
LLVM ERROR: Unhandled GIMPLE statement during LLVM emission!
Modified:
gcc-plugin/trunk/llvm-convert.cpp
Modified: gcc-plugin/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-convert.cpp?rev=76757&r1=76756&r2=76757&view=diff
==============================================================================
--- gcc-plugin/trunk/llvm-convert.cpp (original)
+++ gcc-plugin/trunk/llvm-convert.cpp Wed Jul 22 12:25:31 2009
@@ -71,6 +71,7 @@
#include "except.h"
#include "libfuncs.h"
#include "tree-flow.h"
+#include "tree-pass.h"
#include "rtl.h"
extern int get_pointer_alignment (tree exp, unsigned int max_align);
@@ -765,9 +766,8 @@
case GIMPLE_PREDICT:
case GIMPLE_RESX:
default:
- print_gimple_stmt(stderr, stmt, 4, 0);
- llvm_report_error("Unhandled GIMPLE statement during LLVM emission!\n"
- "gimple_code: " + gimple_code(stmt));
+ print_gimple_stmt(stderr, stmt, 0, TDF_RAW);
+ llvm_report_error("Unhandled GIMPLE statement during LLVM emission!");
break;
}
}
More information about the llvm-commits
mailing list