Does not seem to be a straight error with LLVM itself, but rather the tools, linking issues, here are the errors: Opt: 30> Creating library R:\SDKs\llvm\trunk_VC8_building\lib\Debug\opt.lib and object R:\SDKs\llvm\trunk_VC8_building\lib\Debug\opt.exp 30>LLVMScalarOpts.lib(IndVarSimplify.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall llvm::IVUsers::AddUsersIfInteresting(class llvm::Instruction *)" (?AddUsersIfInteresting at IVUsers@llvm@@QAE_NPAVInstruction at 2@@Z) referenced in function "public: virtual bool __thiscall `anonymous namespace'::IndVarSimplify::runOnLoop(class llvm::LoopBase<class llvm::BasicBlock> *,class llvm::LPPassManager &)" (?runOnLoop at IndVarSimplify@?A0xe882fe7a@@UAE_NPAV?$LoopBase at VBasicBlock@llvm@@@llvm@@AAVLPPassManager at 4@@Z) 30>LLVMScalarOpts.lib(IndVarSimplify.obj) : error LNK2019: unresolved external symbol "public: class llvm::SCEVHandle __thiscall llvm::IVUsers::getReplacementExpr(class llvm::IVStrideUse const &)const " (?getReplacementExpr at IVUsers@llvm@@QBE?AVSCEVHandle at 2@ABVIVStrideUse at 2@@Z) referenced in function "private: void __thiscall `anonymous namespace'::IndVarSimplify::RewriteIVExpressions(class llvm::LoopBase<class llvm::BasicBlock> *,class llvm::Type const *,struct llvm::SCEVExpander &)" (?RewriteIVExpressions at IndVarSimplify@?A0xe882fe7a@@AAEXPAV?$LoopBase at VBasicBlock@llvm@@@llvm@@PBVType at 4@AAUSCEVExpander at 4@@Z) 30>LLVMScalarOpts.lib(IndVarSimplify.obj) : error LNK2001: unresolved external symbol "public: static char llvm::IVUsers::ID" (?ID at IVUsers@llvm@@2DA) 30>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "public: static char llvm::IVUsers::ID" (?ID at IVUsers@llvm@@2DA) 30>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "private: virtual void __thiscall llvm::IVStrideUse::deleted(void)" (?deleted at IVStrideUse@llvm@@EAEXXZ) 30>R:\SDKs\llvm\trunk_VC8_building\bin\Debug\opt.exe : fatal error LNK1120: 4 unresolved externals llc: 33> Creating library R:\SDKs\llvm\trunk_VC8_building\lib\Debug\llc.lib and object R:\SDKs\llvm\trunk_VC8_building\lib\Debug\llc.exp 33>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "private: virtual void __thiscall llvm::IVStrideUse::deleted(void)" (?deleted at IVStrideUse@llvm@@EAEXXZ) 33>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "public: static char llvm::IVUsers::ID" (?ID at IVUsers@llvm@@2DA) 33>R:\SDKs\llvm\trunk_VC8_building\bin\Debug\llc.exe : fatal error LNK1120: 2 unresolved externals lli: 40> Creating library R:\SDKs\llvm\trunk_VC8_building\lib\Debug\lli.lib and object R:\SDKs\llvm\trunk_VC8_building\lib\Debug\lli.exp 40>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "private: virtual void __thiscall llvm::IVStrideUse::deleted(void)" (?deleted at IVStrideUse@llvm@@EAEXXZ) 40>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "public: static char llvm::IVUsers::ID" (?ID at IVUsers@llvm@@2DA) 40>R:\SDKs\llvm\trunk_VC8_building\bin\Debug\lli.exe : fatal error LNK1120: 2 unresolved externals BrainF: 46> Creating library R:\SDKs\llvm\trunk_VC8_building\lib\Debug\BrainF.lib and object R:\SDKs\llvm\trunk_VC8_building\lib\Debug\BrainF.exp 46>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "private: virtual void __thiscall llvm::IVStrideUse::deleted(void)" (?deleted at IVStrideUse@llvm@@EAEXXZ) 46>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "public: static char llvm::IVUsers::ID" (?ID at IVUsers@llvm@@2DA) 46>R:\SDKs\llvm\trunk_VC8_building\bin\Debug\BrainF.exe : fatal error LNK1120: 2 unresolved externals bugpoint: 43> Creating library R:\SDKs\llvm\trunk_VC8_building\lib\Debug\bugpoint.lib and object R:\SDKs\llvm\trunk_VC8_building\lib\Debug\bugpoint.exp 43>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "private: virtual void __thiscall llvm::IVStrideUse::deleted(void)" (?deleted at IVStrideUse@llvm@@EAEXXZ) 43>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "public: static char llvm::IVUsers::ID" (?ID at IVUsers@llvm@@2DA) 43>LLVMScalarOpts.lib(IndVarSimplify.obj) : error LNK2001: unresolved external symbol "public: static char llvm::IVUsers::ID" (?ID at IVUsers@llvm@@2DA) 43>LLVMScalarOpts.lib(IndVarSimplify.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall llvm::IVUsers::AddUsersIfInteresting(class llvm::Instruction *)" (?AddUsersIfInteresting at IVUsers@llvm@@QAE_NPAVInstruction at 2@@Z) referenced in function "public: virtual bool __thiscall `anonymous namespace'::IndVarSimplify::runOnLoop(class llvm::LoopBase<class llvm::BasicBlock> *,class llvm::LPPassManager &)" (?runOnLoop at IndVarSimplify@?A0xe882fe7a@@UAE_NPAV?$LoopBase at VBasicBlock@llvm@@@llvm@@AAVLPPassManager at 4@@Z) 43>LLVMScalarOpts.lib(IndVarSimplify.obj) : error LNK2019: unresolved external symbol "public: class llvm::SCEVHandle __thiscall llvm::IVUsers::getReplacementExpr(class llvm::IVStrideUse const &)const " (?getReplacementExpr at IVUsers@llvm@@QBE?AVSCEVHandle at 2@ABVIVStrideUse at 2@@Z) referenced in function "private: void __thiscall `anonymous namespace'::IndVarSimplify::RewriteIVExpressions(class llvm::LoopBase<class llvm::BasicBlock> *,class llvm::Type const *,struct llvm::SCEVExpander &)" (?RewriteIVExpressions at IndVarSimplify@?A0xe882fe7a@@AAEXPAV?$LoopBase at VBasicBlock@llvm@@@llvm@@PBVType at 4@AAUSCEVExpander at 4@@Z) 43>R:\SDKs\llvm\trunk_VC8_building\bin\Debug\bugpoint.exe : fatal error LNK1120: 4 unresolved externals Fibonacci: 48>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "private: virtual void __thiscall llvm::IVStrideUse::deleted(void)" (?deleted at IVStrideUse@llvm@@EAEXXZ) 48>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "public: static char llvm::IVUsers::ID" (?ID at IVUsers@llvm@@2DA) 48>R:\SDKs\llvm\trunk_VC8_building\bin\Debug\Fibonacci.exe : fatal error LNK1120: 2 unresolved externals HowToUseJIT: 49> Creating library R:\SDKs\llvm\trunk_VC8_building\lib\Debug\HowToUseJIT.lib and object R:\SDKs\llvm\trunk_VC8_building\lib\Debug\HowToUseJIT.exp 49>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "private: virtual void __thiscall llvm::IVStrideUse::deleted(void)" (?deleted at IVStrideUse@llvm@@EAEXXZ) 49>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "public: static char llvm::IVUsers::ID" (?ID at IVUsers@llvm@@2DA) 49>R:\SDKs\llvm\trunk_VC8_building\bin\Debug\HowToUseJIT.exe : fatal error LNK1120: 2 unresolved externals Kaleidoscope: 50> Creating library R:\SDKs\llvm\trunk_VC8_building\lib\Debug\Kaleidoscope.lib and object R:\SDKs\llvm\trunk_VC8_building\lib\Debug\Kaleidoscope.exp 50>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "private: virtual void __thiscall llvm::IVStrideUse::deleted(void)" (?deleted at IVStrideUse@llvm@@EAEXXZ) 50>LLVMScalarOpts.lib(LoopStrengthReduce.obj) : error LNK2001: unresolved external symbol "public: static char llvm::IVUsers::ID" (?ID at IVUsers@llvm@@2DA) 50>R:\SDKs\llvm\trunk_VC8_building\bin\Debug\Kaleidoscope.exe : fatal error LNK1120: 2 unresolved externals Yes, I know they are mostly duplicated linking errors, but this also shows all the apps that fail as well, since not all fail. This was with MSVC2k5 in debug build, happens in all build types though.
On May 12, 2009, at 10:24 PM, OvermindDL1 wrote:> Does not seem to be a straight error with LLVM itself, but rather the > tools, linking issues, here are the errors:Please prepare a patch, thanks! -Chris
On Tue, May 12, 2009 at 11:55 PM, Chris Lattner <clattner at apple.com> wrote:> Dan, can you add IVUsers.cpp to the appropriate cmakefile? > > -chris > > > On May 12, 2009, at 10:54 PM, OvermindDL1 wrote: > >> On Tue, May 12, 2009 at 11:40 PM, Chris Lattner <clattner at apple.com> >> wrote: >>> >>> On May 12, 2009, at 10:24 PM, OvermindDL1 wrote: >>> >>>> Does not seem to be a straight error with LLVM itself, but rather the >>>> tools, linking issues, here are the errors: >>> >>> Please prepare a patch, thanks! >> >> >> Still trying to hunt it down, but from what it seems so far, the file >> IVUsers.cpp does not seem to be compiled into any library, not >> compiled at all (using cmake). I am not sure which library it is >> supposed to be compiled into, LLVMAnalysis? If so then IVUsers.cpp >> needs to be added to the CMakeLists.txt in the lib/analysis/ >> directory. And just checked, the IVStrideUse::deleter error is also >> defined in the IVUser.cpp file as well, so including that will >> probably fix it. Going to resync to trunk again just to make sure, >> add that to the analysis CMakeLists.txt file, and compile to see if >> that works, if so I will submit a patch.Confirmed, once IVUsers.cpp is added to the LLVMAnalysis library, fixed some of those errors, but there are more still. Patch is attached for the IVUsers.cpp add to the CMakeLists.txt file. 32> Creating library R:\SDKs\llvm\trunk_VC8_building\lib\Debug\llc.lib and object R:\SDKs\llvm\trunk_VC8_building\lib\Debug\llc.exp 32>LLVMCodeGen.lib(PrologEpilogInserter.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall llvm::PEI::getAnalysisUsage(class llvm::AnalysisUsage &)const " (?getAnalysisUsage at PEI@llvm@@UBEXAAVAnalysisUsage at 2@@Z) 32>LLVMCodeGen.lib(PrologEpilogInserter.obj) : error LNK2019: unresolved external symbol "private: void __thiscall llvm::PEI::clearAllSets(void)" (?clearAllSets at PEI@llvm@@AAEXXZ) referenced in function "public: virtual bool __thiscall llvm::PEI::runOnMachineFunction(class llvm::MachineFunction &)" (?runOnMachineFunction at PEI@llvm@@UAE_NAAVMachineFunction at 2@@Z) 32>LLVMCodeGen.lib(PrologEpilogInserter.obj) : error LNK2019: unresolved external symbol "private: void __thiscall llvm::PEI::placeCSRSpillsAndRestores(class llvm::MachineFunction &)" (?placeCSRSpillsAndRestores at PEI@llvm@@AAEXAAVMachineFunction at 2@@Z) referenced in function "public: virtual bool __thiscall llvm::PEI::runOnMachineFunction(class llvm::MachineFunction &)" (?runOnMachineFunction at PEI@llvm@@UAE_NAAVMachineFunction at 2@@Z) 32>R:\SDKs\llvm\trunk_VC8_building\bin\Debug\llc.exe : fatal error LNK1120: 3 unresolved externals Do note, this linking error appears a few times, but they are all identical to this one, looks like the last. -------------- next part -------------- A non-text attachment was scrubbed... Name: IVUsers_cpp_to_CMakeLists.patch Type: application/octet-stream Size: 364 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090513/ea76cf9a/attachment.obj>
On Wed, May 13, 2009 at 12:19 AM, OvermindDL1 <overminddl1 at gmail.com> wrote:> On Tue, May 12, 2009 at 11:55 PM, Chris Lattner <clattner at apple.com> wrote: >> Dan, can you add IVUsers.cpp to the appropriate cmakefile? >> >> -chris >> >> >> On May 12, 2009, at 10:54 PM, OvermindDL1 wrote: >> >>> On Tue, May 12, 2009 at 11:40 PM, Chris Lattner <clattner at apple.com> >>> wrote: >>>> >>>> On May 12, 2009, at 10:24 PM, OvermindDL1 wrote: >>>> >>>>> Does not seem to be a straight error with LLVM itself, but rather the >>>>> tools, linking issues, here are the errors: >>>> >>>> Please prepare a patch, thanks! >>> >>> >>> Still trying to hunt it down, but from what it seems so far, the file >>> IVUsers.cpp does not seem to be compiled into any library, not >>> compiled at all (using cmake). I am not sure which library it is >>> supposed to be compiled into, LLVMAnalysis? If so then IVUsers.cpp >>> needs to be added to the CMakeLists.txt in the lib/analysis/ >>> directory. And just checked, the IVStrideUse::deleter error is also >>> defined in the IVUser.cpp file as well, so including that will >>> probably fix it. Going to resync to trunk again just to make sure, >>> add that to the analysis CMakeLists.txt file, and compile to see if >>> that works, if so I will submit a patch. > > > Confirmed, once IVUsers.cpp is added to the LLVMAnalysis library, > fixed some of those errors, but there are more still. Patch is > attached for the IVUsers.cpp add to the CMakeLists.txt file. > > 32> Creating library > R:\SDKs\llvm\trunk_VC8_building\lib\Debug\llc.lib and object > R:\SDKs\llvm\trunk_VC8_building\lib\Debug\llc.exp > 32>LLVMCodeGen.lib(PrologEpilogInserter.obj) : error LNK2001: > unresolved external symbol "public: virtual void __thiscall > llvm::PEI::getAnalysisUsage(class llvm::AnalysisUsage &)const " > (?getAnalysisUsage at PEI@llvm@@UBEXAAVAnalysisUsage at 2@@Z) > 32>LLVMCodeGen.lib(PrologEpilogInserter.obj) : error LNK2019: > unresolved external symbol "private: void __thiscall > llvm::PEI::clearAllSets(void)" (?clearAllSets at PEI@llvm@@AAEXXZ) > referenced in function "public: virtual bool __thiscall > llvm::PEI::runOnMachineFunction(class llvm::MachineFunction &)" > (?runOnMachineFunction at PEI@llvm@@UAE_NAAVMachineFunction at 2@@Z) > 32>LLVMCodeGen.lib(PrologEpilogInserter.obj) : error LNK2019: > unresolved external symbol "private: void __thiscall > llvm::PEI::placeCSRSpillsAndRestores(class llvm::MachineFunction &)" > (?placeCSRSpillsAndRestores at PEI@llvm@@AAEXAAVMachineFunction at 2@@Z) > referenced in function "public: virtual bool __thiscall > llvm::PEI::runOnMachineFunction(class llvm::MachineFunction &)" > (?runOnMachineFunction at PEI@llvm@@UAE_NAAVMachineFunction at 2@@Z) > 32>R:\SDKs\llvm\trunk_VC8_building\bin\Debug\llc.exe : fatal error > LNK1120: 3 unresolved externals > > > Do note, this linking error appears a few times, but they are all > identical to this one, looks like the last. >Yep, missing ShrinkWrapping.cpp in the lib\CodeGen\CMakeLists.txt file. Have not tested (out of time, need to stop this), but I am rather certain that it is just that problem now.
Reasonably Related Threads
- [LLVMdev] MSVC compile error with trunk
- [LLVMdev] IVUsers (LoopPass) analysis in a ModulePass?
- IVUsers pass is fragile. Is this okay? How can it be resolved?
- IVUsers pass is fragile. Is this okay? How can it be resolved?
- IVUsers pass is fragile. Is this okay? How can it be resolved?