[LLVMdev] typeinfo for llvm::MCAsmInfo is missing

Vladimir Pouzanov farcaller at gmail.com
Mon Dec 10 13:27:39 PST 2012

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121210/cabaab67/attachment.bin>

More information about the llvm-dev mailing list