Alex Bradley via llvm-dev
2016-Sep-11 21:44 UTC
[llvm-dev] [Target] AsmParser Error : key functions missing
Hi All, I wrote a very crude and simple AsmParser for my backend. llvm-tablegen also generates asm-matcher .inc file without any error. I have included the .inc file in my class for AsmParser. However, while building llvm, in linking stage for LTO, i am getting error - undefined reference to functions - ComputeAvailableFeatures, MatchInstructionImpl, MatchRegisterName and convertToMapAndConstraints. I see these functions declared and defined in GenAsmMatcher.inc file which i have included in my AsmParser class. Still i am getting the error. I may be missing something very basic. Can someone please help in resolving this error? Thanks. Regards, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160911/998172d4/attachment.html>
Visoiu Mistrih Francis via llvm-dev
2016-Sep-12 03:09 UTC
[llvm-dev] [Target] AsmParser Error : key functions missing
Hi Alex, The 09/11/2016 14:44, Alex Bradley via llvm-dev wrote:> I see these functions declared and defined in GenAsmMatcher.inc file which > i have included in my AsmParser class. Still i am getting the error. I may > be missing something very basic.Did you correctly `#define GET_MATCHER_IMPLEMENTATION` before including the `.inc` ? The `.inc` is guarded by several macros. Take a look at how other targets include `GenAsmMatcher.inc`. Cheers, -- Francis Visoiu Mistrih francis at lse.epita.fr LSE | EPITAThe 09/11/2016 14:44, Alex Bradley via llvm-dev wrote:
Alex Bradley via llvm-dev
2016-Sep-12 10:02 UTC
[llvm-dev] [Target] AsmParser Error : key functions missing
Thanks Visoiu. I am able to resolve the error and get my backend registered with llc. Regards, Alex On 12 Sep 2016 08:39, "Visoiu Mistrih Francis" <thegameg1 at yahoo.com> wrote:> Hi Alex, > > The 09/11/2016 14:44, Alex Bradley via llvm-dev wrote: > > I see these functions declared and defined in GenAsmMatcher.inc file > which > > i have included in my AsmParser class. Still i am getting the error. I > may > > be missing something very basic. > > Did you correctly `#define GET_MATCHER_IMPLEMENTATION` before including > the `.inc` ? > > The `.inc` is guarded by several macros. Take a look at how other > targets include `GenAsmMatcher.inc`. > > Cheers, > > -- > Francis Visoiu Mistrih > francis at lse.epita.fr > LSE | EPITAThe 09/11/2016 14:44, Alex Bradley via llvm-dev wrote: >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160912/e6435389/attachment.html>