[LLVMdev] Instruction::getOpcodeName()

Reid Spencer reid at x10sys.com
Tue May 9 09:55:48 PDT 2006

When compiling a release version on Linux with GCC 3.4.4, I get the
following warnings repeated multiple times when linking LLVMCore.o:

/usr/bin/ld: `.gnu.linkonce.t._ZNK4llvm11Instruction13getOpcodeNameEv' referenced in section `.gnu.linkonce.r._ZNK4llvm11Instruction13getOpcodeNameEv' of /proj/llvm/build/lib/VMCore/Release/Instruction.o: defined in discarded section `.gnu.linkonce.t._ZNK4llvm11Instruction13getOpcodeNameEv' of /proj/llvm/build/lib/VMCore/Release/Instruction.o

This is apparently coming from Instruction.h: 

virtual const char *getOpcodeName() const {
  return getOpcodeName(getOpcode());

Would anyone object to me putting this method into Instruction.cpp so
that the multiple (ignored) copies don't get generated? I don't think
this is getting inlined anyway because it is virtual. Does it need to be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060509/89e8532e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060509/89e8532e/attachment.sig>

More information about the llvm-dev mailing list