[LLVMdev] typeinfo for llvm::MCAsmInfo is missing

Jim Grosbach grosbach at apple.com
Mon Dec 10 13:57:48 PST 2012


Llvm typically doesn't build with RTTI enabled. Perhaps that's what you're running into?

Jim

On Dec 10, 2012, at 1:27 PM, Vladimir Pouzanov <farcaller at gmail.com> wrote:

> Hi all.
> 
> I fully understand that the problem is a bit OT for llvmdev, but I'm stuck for two days now and I really need some direct push.
> 
> To the problem. I have a C++ shared library, that's working with llvm C++ api. Consider a function:
> 
> static Object llvm_Target_createMCAsmInfo(Object self, Object tripleName)
> {
>    llvm::Target target = from_ruby<llvm::Target>(self);
>    char const *triple = from_ruby<char const *>(tripleName);
>    
>    llvm::MCAsmInfo *MAI = target.createMCAsmInfo(triple);
>    return to_ruby<llvm::MCAsmInfo>(*MAI);
> }
> 
> The problem here, is it's ok to use llvm::MCAsmInfo objects, but as soon as I use it in the cast (e.g. to_ruby), I immediately get an undefined symbol __ZTIN4llvm9MCAsmInfoE. Similar symbols for other llvm classes are there in my library's .o file, this one does not.
> 
> Any hints?
> 
> -- 
> Vladimir Pouzanov
> http://www.farcaller.net/
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list