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
virtual?
Reid.
-------------- 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>
On Tue, 9 May 2006, Reid Spencer wrote:> 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.oStrange.> This is apparently coming from Instruction.h: > virtual const char *getOpcodeName() const { > return getOpcodeName(getOpcode()); > }ok.> 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 > virtual?You're right, moving it out of line would be fine. However, you're also right that it doesn't actually need to be virtual. I made it non virtual, so hopefully the problem will go away. Thanks Reid! -Chris -- http://nondot.org/sabre/ http://llvm.org/