[LLVMdev] [LLVMDev] Trouble Linking

Óscar Fuentes ofv at wanadoo.es
Fri Oct 15 13:44:28 PDT 2010


Jeff Kunkel <jdkunk3 at gmail.com> writes:

> I'm sorry, I don't know what you were looking for. The first 5 were
> scattered amidst different e-mails. The others have to do with
> following what "RAFast" and "RALinScan" as examples. It's a linker
> error, and I do not know why only opt and bugpoint does not compiler,
> and why llc does not show my reg alloc pass anymore. It worked before
> the API change e-mail was released.
>
> 1) I created my .cpp file RegAllocJDKunk.cpp in llvm/lib/CodeGen/ directory.
> 2) I updated the CMakeList.txt in the directory llvm/lib/CodeGen/ to
> include RegAllocJDKunk.cpp.
> 3) I added "(void) llvm::createJDKunkRegisterAllocator();" to the
> struct ForcePassLinking::ForcePassLinking() method in
> "llvm\include\llvm\LinkAllPasses.h"
> 4) I added "FunctionPass* createJDKunkRegisterAllocator();" to header
> "llvm\CodeGen\Passes.h."
> 5) I implemented "FunctionPass* createJDKunkRegisterAllocator()" in my cpp file.
> 6) I added "initializeRAJDKunk(Registry);" to
> llvm/lib/CodeGen/CodeGen.cpp in the "void
> llvm::initializeCodeGen(PassRegistry &Registry)"
> 7) I added "void initializeRAJDKunk(PassRegistry&);" to the header
> file "llvm\include\llvm\InitializePasses.h."
> 8) Cmake ran, and Visaul Studio build all but opt and bugpoint because
> of the errors at the bottom of this message.
> 9) I don't know why this does not link anymore. I remember it worked
> before the API change e-mail was sent, so I assumed I missed something
> with the api change. This is the only reason I can see.

Thanks, that's much better.

If you can provide a patch comprising all those changes I'll take a look
at it.

[snip]



More information about the llvm-dev mailing list