이광무 via llvm-dev
2019-Jan-02 07:48 UTC
[llvm-dev] Missing TerminatorInst in the trunk no. 350084
I stumbled upon a baffling error while compiling my pass. I was moving my development environment and updated LLVM to the trunk number 350084 in the meantime. [ 11%] Building CXX object lib/Transforms/TimePred/CMakeFiles/TimePred.dir/Common/Formatter.cpp.o /home/gwangmu/opt/llvm/lib/Transforms/TimePred/Common/Formatter.cpp:182:24: error: ‘TerminatorInst’ was not declared in this scope void Formatter::write<TerminatorInst *>(TerminatorInst *obj) ^~~~~~~~~~~~~~ /home/gwangmu/opt/llvm/lib/Transforms/TimePred/Common/Formatter.cpp:182:18: error: parse error in template argument list void Formatter::write<TerminatorInst *>(TerminatorInst *obj) ^~~~~~~~~~~~~~~~~~~~~~~ /home/gwangmu/opt/llvm/lib/Transforms/TimePred/Common/Formatter.cpp:182:42: error: template-id ‘write<<expression error> >’ used as a declarator void Formatter::write<TerminatorInst *>(TerminatorInst *obj) ^~~~~~~~~~~~~~ At first I thought TerminatorInst has been moved to another header, but it seems TerminatorInst has been totally removed at some point. Some of the terminators that I know is now even inheriting the very base class (Instruction) not TerminatorInst. (In llvm/IR/Instructions.h) 2911 /// 2912 class BranchInst : public Instruction { 2913 /// Ops list - Branches are strange. The operands are ordered: 2829 /// 2830 class ReturnInst : public Instruction { 2831 ReturnInst(const ReturnInst &RI); Was TerminatorInst actually removed and deprecated? If it's the case, is there any workaround that I can use when fixing my pass not to use TerminatorInst, hopefully with a minimum amount of change? Regards, Gwangmu Lee. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190102/b3df4e4a/attachment.html>
Krzysztof Parzyszek via llvm-dev
2019-Jan-02 16:34 UTC
[llvm-dev] Missing TerminatorInst in the trunk no. 350084
On 1/2/2019 1:48 AM, 이광무 via llvm-dev wrote:> Was TerminatorInst actually removed and deprecated?Yes, it has been removed. See http://lists.llvm.org/pipermail/llvm-dev/2018-May/123407.html -Krzysztof -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Alberto Barbaro via llvm-dev
2019-Jan-02 17:31 UTC
[llvm-dev] Missing TerminatorInst in the trunk no. 350084
Hi, Maybe you could use Instruction and cast it to the class you want using dyn_cast? I don't know if it is the best approach anyway. HTH On Wed, Jan 2, 2019, 16:34 Krzysztof Parzyszek via llvm-dev < llvm-dev at lists.llvm.org wrote:> On 1/2/2019 1:48 AM, 이광무 via llvm-dev wrote: > > Was TerminatorInst actually removed and deprecated? > > Yes, it has been removed. > See http://lists.llvm.org/pipermail/llvm-dev/2018-May/123407.html > > -Krzysztof > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, > hosted by The Linux Foundation > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190102/3e55d562/attachment.html>