添加了一个 pass 后,llvm 编译报错:
In file included from ./headers/llvm/IR/Function.h:26:
In file included from ./headers/llvm/IR/Argument.h:19:
./headers/llvm/IR/Attributes.h(74,14): fatal error: 'llvm/IR/Attributes.inc' file not found
#include "llvm/IR/Attributes.inc"
解决:
在你添加的模块的 CMakeLists.txt 中加上
add_dependencies(<Module Name> intrinsics_gen)