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
> When I run the following example, I get this error: > LLVM ERROR: Invalid instruction > > Replacing C++ with trivial hello world makes it work.Most probably it was not updated to support new EH instructions -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
On Mon, Jan 9, 2012 at 10:50 PM, Yuri <yuri at rawbw.com> wrote:> 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 > > YuriIf I had to guess, I would say the landingpad instruction is missing. Patches welcome. -Eli
Seemingly Similar Threads
- [LLVMdev] --enable-shared doesn't build shared library any more
- [LLVMdev] [PATCH] with no response: Bug 13163 - BlockAddress instruction with use from the global context is damaged during module link
- [LLVMdev] Can WriteBitcodeToFile be parallelized?
- [LLVMdev] Why variables get "optimized away" after the last use in unoptimized code?
- [LLVMdev] Is there 'Nop' instruction?