LLVM Discussion Forums

Tblgen error while compiling LLVM / Clang source

I got this error when compiling llvm:

Included from [...]/llvm-project-10.0.0/llvm/include/llvm/IR/Intrinsics.td:1351:
[...]/llvm/llvm-project-10.0.0/llvm/include/llvm/IR/IntrinsicsAArch64.td:381:3: error: Parameter #0 has out of bounds matching number 0
   def int_aarch64_neon_abs : AdvSIMD_1Arg_Intrinsic;

The command line echoed from makefile produced this error:

[...]/llvm-project-10.0.0-b/bin/llvm-tblgen -gen-intrinsic-impl -I [...]/llvm-project-10.0.0/llvm/include/llvm/IR -I [...]/llvm-project-10.0.0/llvm/include [...]/llvm-project-10.0.0/llvm/include/llvm/IR/Intrinsics.td --write-if-changed -o ./IntrinsicImpl.inc

I have tried experiments, and specify LLVM_TARGETS_TO_BUILD only to X86, and commented out ARM architetures in Intrinsics.td, but still got error:

[...]/llvm-project-10.0.0/llvm/include/llvm/IR/Intrinsics.td:859:1: error: Parameter #0 has out of bounds matching number 0
def int_annotation : Intrinsic<[llvm_anyint_ty],
^
[...]/llvm-project-10.0.0/llvm/include/llvm/IR/Intrinsics.td:859:1: error: ParamTypes is [anonymous_12, llvm_ptr_ty, llvm_ptr_ty, llvm_i32_ty]
def int_annotation : Intrinsic<[llvm_anyint_ty],