Skip to content

Commit 92d1d83

Browse files
committed
[NFC][HLSL][RootSignature] Move HLSLRootSignatureParser into clangSema
Noting: - Currently, `HLSLRootSignatureParser` is defined in `clangParse`, as it would naturally seem an appropriate place to place. - Surprisingly, `clangParse` has a dependency on `clangSema`. So we can't introduce a dependency of `clangSema` onto `clangParse`. - Given the users of `HLSLRootSignatureParser` will be `SemaHLSL` when parsing from source and `clangFrontend` when we are parsing as a command line argument. - Therefore, we are required to move this out of `clangParse` so that `clangSema` can reference it. This commit moves `HLSLRootSignatureParser` into `clangSema` so it can be linked to all its dependencies (`clangFrontend` already depends on `clangSema`)
1 parent 06e8bf2 commit 92d1d83

File tree

8 files changed

+5
-24
lines changed

8 files changed

+5
-24
lines changed

clang/lib/Parse/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ add_clang_library(clangParse
1414
ParseExpr.cpp
1515
ParseExprCXX.cpp
1616
ParseHLSL.cpp
17-
ParseHLSLRootSignature.cpp
1817
ParseInit.cpp
1918
ParseObjc.cpp
2019
ParseOpenMP.cpp

clang/lib/Sema/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ add_clang_library(clangSema
2626
JumpDiagnostics.cpp
2727
MultiplexExternalSemaSource.cpp
2828
ParsedAttr.cpp
29+
ParseHLSLRootSignature.cpp
2930
Scope.cpp
3031
ScopeInfo.cpp
3132
Sema.cpp

clang/lib/Parse/ParseHLSLRootSignature.cpp renamed to clang/lib/Sema/ParseHLSLRootSignature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "clang/Parse/ParseHLSLRootSignature.h"
9+
#include "clang/Sema/ParseHLSLRootSignature.h"
1010

1111
#include "clang/Lex/LiteralSupport.h"
1212

clang/unittests/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ endfunction()
4949

5050
add_subdirectory(Basic)
5151
add_subdirectory(Lex)
52-
add_subdirectory(Parse)
5352
add_subdirectory(Driver)
5453
if(CLANG_ENABLE_STATIC_ANALYZER)
5554
add_subdirectory(Analysis)

clang/unittests/Parse/CMakeLists.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

clang/unittests/Sema/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ add_clang_unittest(SemaTests
33
CodeCompleteTest.cpp
44
HeuristicResolverTest.cpp
55
GslOwnerPointerInference.cpp
6+
ParseHLSLRootSignatureTest.cpp
67
SemaLookupTest.cpp
78
SemaNoloadLookupTest.cpp
89
CLANG_LIBS
910
clangAST
1011
clangASTMatchers
1112
clangBasic
1213
clangFrontend
14+
clangLex
1315
clangParse
1416
clangSema
1517
clangSerialization

clang/unittests/Parse/ParseHLSLRootSignatureTest.cpp renamed to clang/unittests/Sema/ParseHLSLRootSignatureTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "clang/Lex/PreprocessorOptions.h"
2222

2323
#include "clang/Lex/LexHLSLRootSignature.h"
24-
#include "clang/Parse/ParseHLSLRootSignature.h"
24+
#include "clang/Sema/ParseHLSLRootSignature.h"
2525
#include "gtest/gtest.h"
2626

2727
using namespace clang;

0 commit comments

Comments
 (0)