Error while compiling registerInfo.cpp

Dear All,

I have declared register.td and registerInfo.cpp file but while compiling It is showing

as follows
‘LR’ is not a member of ‘llvm::SYMPL’
‘SP’ is not a member of ‘llvm::SYMPL’
‘GPRegsRegClassID’ was not declared in this scope

Following I am attaching register.cpp and .td and .inc files

SYMPLRegisterInfo.cpp (3.32 KB)

SYMPLRegisterInfo.td (1.08 KB)

SYMPLGenRegisterInfo.inc (11 KB)

Guys please give me some solution for this problem

Hello,

*‘LR’ is not a member of ‘llvm::SYMPL’ ‘SP’ is not a member of
‘llvm::SYMPL’‘GPRegsRegClassID’ was not declared in this scope *

You have to include `SYMPLGenRegisterInfo.inc" with the correct macro
defined. The macro to use in order to access the enum members `LR` and
`SP` is `GET_REGINFO_ENUM`.

So, you should have the following:

#define GET_REGINFO_ENUM
#include "SYMPLGenRegisterInfo.inc"

I suggest you take a look at the macros guarding the different parts in
`GenRegisterInfo.inc`.

Cheers,