craig.topper added a comment. TableGen cannot import a file from the IR directory. It will be considered a layering violation even though its only a header dependency. Repository: rL LLVM https://reviews.llvm.org/D46119