Our dialect currently has a monolithic cpp file for the non-tablegen’ed implementations of methods for all our tablegen’ed attrs/types/ops. I’d like to split that cpp file up (with all the new cpp files remaining in the same library), but the compiler is giving errors about the storage classes being incomplete (which weren’t there with the monolithic cpp file). Anyone know how to fix this?
That indicates in general a missing include?
Before splitting things I had the working setup:
// MyDialect.h
#define GET_ATTRDEF_CLASSES
#include ".../AttrDefs.h.inc"
// MyDialect.cpp
#include ".../MyDialect.h"
#define GET_ATTRDEF_CLASSES
#include ".../AttrDefs.cpp.inc"
In my current attempt at splitting things I kept the above as-is, and added the new file:
// MyDialectParser.cpp
#include ".../MyDialect.h"
Where the definition of SomeAttr::parse
was also moved from MyDialect.cpp to MyDialectParser.cpp
So what include is missing? Or is there some other problem going on here?