[LLVMdev] Demo invalid instruction

Paul J. Lucas paul at lucasmail.org
Mon Apr 2 16:57:49 PDT 2012


Using the LLVM demo <http://llvm.org/demo/> with this code:

> int G;
> 
> struct E {
> };
> 
> struct S {
>   ~S();
>   void throw_it();
> };
> 
> S::~S() {
>   ++G;
> }
> 
> void S::throw_it() {
>   throw E();
> }
> 
> int main() {
>   S s;
>   s.throw_it();
> }

and selecting C++ as the source language an "LLVM C++ API code" as the target gets me:

> LLVM ERROR: Invalid instruction

Why?

- Paul





More information about the llvm-dev mailing list