TableGen: how to run llvm-tblgen tool with pre-defined .td files?

The problem is as follows:

Say I have created a file, where I need to include the file:
(adapted from this stackoverflow post)

include "/<user-home>/llvm-project/llvm/include/llvm/Target/"

class Test<bits<3> num, string n, list<string> altNames> : Register<n, altNames> {
    field bits<3> Num = num;
    let Namespace = "Test";

foreach num = 0-9 in
def Z#num : Test<num, "Z"#num>;

def Zrc : RegisterClass<"Test", [i32, f32], 32,
    (sequence "Z%u", 0, 9)>;

Now, to generate the record, I am using the following command:

llvm-tblgen -print-records -I /<user-home>/llvm-project/llvm/include/llvm/Target/ -I /<user-home>/llvm-project/llvm/include/llvm/IR/

The above command generates the following error:

/<user-home>/llvm-project/llvm/include/llvm/Target/ error: Could not find include file 'llvm/IR/'
include "llvm/IR/"

So, the question is, while using the llvm-tblgen command, is there a way to handle the relative include paths defined in the system .td files?

-I /<user-home>/llvm-project/llvm/include looks to be what you’re missing?