Simple TableGen question, where is the definition for CCAction? It’s given a forward declaration in TargetCallingConv.td alongside another forward declaration for CallingConv.
class CCAction;
class CallingConv;
As I’d expect, CallingConv is defined later in the file:
class CallingConv<list actions> { … }
But I can’t find any definition for CCAction anywhere in the LLVM sources. I thought this might be idiomatically referring to an underlying C++ type but I couldn’t find that either. Any explanation?
thanks,
C
Simple TableGen question, where is the definition for CCAction? It’s given a forward declaration in TargetCallingConv.td alongside another forward declaration for CallingConv.
class CCAction;
That’s actually the whole declaration. It defines a tablegen class with no fields and is only really there to allow tablegen to type check CallingConv’s argument.
class CallingConv;
As I’d expect, CallingConv is defined later in the file:
class CallingConv<list actions> { … }
But I can’t find any definition for CCAction anywhere in the LLVM sources. I thought this might be idiomatically referring to an underlying C++ type but I couldn’t find that either. Any explanation?
There’s no correspondence with C++. Tablegen is essentially a database of records that the llvm-tblgen command can use to generate other files (usually C++). In this case, the code generator is in utils/TableGen/CallingConvEmitter.cpp and you’ll see checks like ‘Action->isSubClassOf(“CCAssignToReg”)’ for each of CCAction’s subclasses.
Hope that helps