[LLVMdev] llc -march=cpp is broken?

Yuri yuri at rawbw.com
Mon Jan 9 22:50:39 PST 2012


When I run the following example, I get this error:
LLVM ERROR: Invalid instruction

Replacing C++ with trivial hello world makes it work.

rev.147747

Yuri


--- example (please save as .sh file) ---
#!/bin/sh

cat >f.C <<_END_
extern void xthrowingx();
extern void xcatchingx_char(char c);
extern void xcatchingx_int(int i);
extern void xcatchingx_all();

void f() {
   try {
     xthrowingx();
   } catch (char c) {
     xcatchingx_char(c);
   } catch (int i) {
     xcatchingx_int(i);
   } catch (...) {
     xcatchingx_all();
   }
}

_END_

clang++ -emit-llvm -c f.C -o f.bc
llc -march=cpp f.bc




More information about the llvm-dev mailing list