llvm-project/clang/lib/Parse/CMakeLists.txt
Finn Plummer 676755561d
Reland "[HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses" (#133958)
This pr relands https://github.com/llvm/llvm-project/pull/133302.

It resolves two issues:
- Linking error during build,
[here](https://github.com/llvm/llvm-project/pull/133302#issuecomment-2767259848).
There was a missing dependency for `clangLex` for the
`ParseHLSLRootSignatureTest.cpp` unit testing. This library was added to
the dependencies to resolve the error. It wasn't caught previously as
the library was transitively linked in most build environments
- Warning of unused declaration,
[here](https://github.com/llvm/llvm-project/pull/133302#issuecomment-2767091368).
There was a usability line in `LexHLSLRootSignature.h` of the form
`using TokenKind = enum RootSignatureToken::Kind` which causes this
error. The declaration is removed from the header file to be used
locally in the `.cpp` files that use it.
Notably, the original pr would also exposed `clang::hlsl::TokenKind` to
everywhere it was included, which had a name clash with
`tok::TokenKind`. This is another motivation to change to the proposed
resolution.

---------

Co-authored-by: Finn Plummer <finnplummer@microsoft.com>
2025-04-01 14:58:30 -07:00

39 lines
557 B
CMake

set(LLVM_LINK_COMPONENTS
FrontendOpenMP
MC
MCParser
Support
TargetParser
)
add_clang_library(clangParse
ParseAST.cpp
ParseCXXInlineMethods.cpp
ParseDecl.cpp
ParseDeclCXX.cpp
ParseExpr.cpp
ParseExprCXX.cpp
ParseHLSL.cpp
ParseHLSLRootSignature.cpp
ParseInit.cpp
ParseObjc.cpp
ParseOpenMP.cpp
ParsePragma.cpp
ParseStmt.cpp
ParseStmtAsm.cpp
ParseTemplate.cpp
ParseTentative.cpp
Parser.cpp
ParseOpenACC.cpp
LINK_LIBS
clangAST
clangBasic
clangLex
clangSema
DEPENDS
omp_gen
ClangDriverOptions
)