Code snippets produced by TableGen are protected by a macro symbol.
Usually, this symbol is undefined on the top of the snippet.
The exception is the GlobalISel emitter.
This change adds the #undef to the emitter, and remove the #undefs from the targets.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp | ||
---|---|---|
63 | The target still needs to define the macro at the include point, so it feels weird to hide this away in the generated file |
Comment Actions
In most other cases, it is done in this way. E.g. from AArch64RegisterInfo.h:
#define GET_REGINFO_HEADER #include "AArch64GenRegisterInfo.inc"
Only the GLobalISelEmitter and the GICombineEmitter don't emit the #undef, which I found confusing.
The target still needs to define the macro at the include point, so it feels weird to hide this away in the generated file