-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[NFC][HLSL][RootSignature] Move HLSLRootSignatureParser into clangSema
#137381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFC][HLSL][RootSignature] Move HLSLRootSignatureParser into clangSema
#137381
Conversation
|
@llvm/pr-subscribers-clang Author: Finn Plummer (inbelic) ChangesNoting:
This commit moves Full diff: https://github.com/llvm/llvm-project/pull/137381.diff 8 Files Affected:
diff --git a/clang/include/clang/Parse/ParseHLSLRootSignature.h b/clang/include/clang/Sema/ParseHLSLRootSignature.h
similarity index 100%
rename from clang/include/clang/Parse/ParseHLSLRootSignature.h
rename to clang/include/clang/Sema/ParseHLSLRootSignature.h
diff --git a/clang/lib/Parse/CMakeLists.txt b/clang/lib/Parse/CMakeLists.txt
index 00fde537bb9c6..22e902f7e1bc5 100644
--- a/clang/lib/Parse/CMakeLists.txt
+++ b/clang/lib/Parse/CMakeLists.txt
@@ -14,7 +14,6 @@ add_clang_library(clangParse
ParseExpr.cpp
ParseExprCXX.cpp
ParseHLSL.cpp
- ParseHLSLRootSignature.cpp
ParseInit.cpp
ParseObjc.cpp
ParseOpenMP.cpp
diff --git a/clang/lib/Sema/CMakeLists.txt b/clang/lib/Sema/CMakeLists.txt
index 4b87004e4b8ea..9ca4b8e6ab96b 100644
--- a/clang/lib/Sema/CMakeLists.txt
+++ b/clang/lib/Sema/CMakeLists.txt
@@ -26,6 +26,7 @@ add_clang_library(clangSema
JumpDiagnostics.cpp
MultiplexExternalSemaSource.cpp
ParsedAttr.cpp
+ ParseHLSLRootSignature.cpp
Scope.cpp
ScopeInfo.cpp
Sema.cpp
diff --git a/clang/lib/Parse/ParseHLSLRootSignature.cpp b/clang/lib/Sema/ParseHLSLRootSignature.cpp
similarity index 99%
rename from clang/lib/Parse/ParseHLSLRootSignature.cpp
rename to clang/lib/Sema/ParseHLSLRootSignature.cpp
index 042aedbf1af52..87b5022cb0abe 100644
--- a/clang/lib/Parse/ParseHLSLRootSignature.cpp
+++ b/clang/lib/Sema/ParseHLSLRootSignature.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Parse/ParseHLSLRootSignature.h"
+#include "clang/Sema/ParseHLSLRootSignature.h"
#include "clang/Lex/LiteralSupport.h"
diff --git a/clang/unittests/CMakeLists.txt b/clang/unittests/CMakeLists.txt
index f3823ba309420..580533a97d700 100644
--- a/clang/unittests/CMakeLists.txt
+++ b/clang/unittests/CMakeLists.txt
@@ -49,7 +49,6 @@ endfunction()
add_subdirectory(Basic)
add_subdirectory(Lex)
-add_subdirectory(Parse)
add_subdirectory(Driver)
if(CLANG_ENABLE_STATIC_ANALYZER)
add_subdirectory(Analysis)
diff --git a/clang/unittests/Parse/CMakeLists.txt b/clang/unittests/Parse/CMakeLists.txt
deleted file mode 100644
index 2a31be625042e..0000000000000
--- a/clang/unittests/Parse/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-set(LLVM_LINK_COMPONENTS
- Support
- )
-add_clang_unittest(ParseTests
- ParseHLSLRootSignatureTest.cpp
- )
-clang_target_link_libraries(ParseTests
- PRIVATE
- clangAST
- clangBasic
- clangLex
- clangParse
- clangSema
- )
-target_link_libraries(ParseTests
- PRIVATE
- LLVMTestingAnnotations
- LLVMTestingSupport
- clangTesting
- )
diff --git a/clang/unittests/Sema/CMakeLists.txt b/clang/unittests/Sema/CMakeLists.txt
index acc76c932afeb..a5c6b44926460 100644
--- a/clang/unittests/Sema/CMakeLists.txt
+++ b/clang/unittests/Sema/CMakeLists.txt
@@ -3,6 +3,7 @@ add_clang_unittest(SemaTests
CodeCompleteTest.cpp
HeuristicResolverTest.cpp
GslOwnerPointerInference.cpp
+ ParseHLSLRootSignatureTest.cpp
SemaLookupTest.cpp
SemaNoloadLookupTest.cpp
CLANG_LIBS
@@ -10,6 +11,7 @@ add_clang_unittest(SemaTests
clangASTMatchers
clangBasic
clangFrontend
+ clangLex
clangParse
clangSema
clangSerialization
diff --git a/clang/unittests/Parse/ParseHLSLRootSignatureTest.cpp b/clang/unittests/Sema/ParseHLSLRootSignatureTest.cpp
similarity index 99%
rename from clang/unittests/Parse/ParseHLSLRootSignatureTest.cpp
rename to clang/unittests/Sema/ParseHLSLRootSignatureTest.cpp
index 2d4e37463bef3..76c437689c4d3 100644
--- a/clang/unittests/Parse/ParseHLSLRootSignatureTest.cpp
+++ b/clang/unittests/Sema/ParseHLSLRootSignatureTest.cpp
@@ -21,7 +21,7 @@
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Lex/LexHLSLRootSignature.h"
-#include "clang/Parse/ParseHLSLRootSignature.h"
+#include "clang/Sema/ParseHLSLRootSignature.h"
#include "gtest/gtest.h"
using namespace clang;
|
|
@llvm/pr-subscribers-hlsl Author: Finn Plummer (inbelic) ChangesNoting:
This commit moves Full diff: https://github.com/llvm/llvm-project/pull/137381.diff 8 Files Affected:
diff --git a/clang/include/clang/Parse/ParseHLSLRootSignature.h b/clang/include/clang/Sema/ParseHLSLRootSignature.h
similarity index 100%
rename from clang/include/clang/Parse/ParseHLSLRootSignature.h
rename to clang/include/clang/Sema/ParseHLSLRootSignature.h
diff --git a/clang/lib/Parse/CMakeLists.txt b/clang/lib/Parse/CMakeLists.txt
index 00fde537bb9c6..22e902f7e1bc5 100644
--- a/clang/lib/Parse/CMakeLists.txt
+++ b/clang/lib/Parse/CMakeLists.txt
@@ -14,7 +14,6 @@ add_clang_library(clangParse
ParseExpr.cpp
ParseExprCXX.cpp
ParseHLSL.cpp
- ParseHLSLRootSignature.cpp
ParseInit.cpp
ParseObjc.cpp
ParseOpenMP.cpp
diff --git a/clang/lib/Sema/CMakeLists.txt b/clang/lib/Sema/CMakeLists.txt
index 4b87004e4b8ea..9ca4b8e6ab96b 100644
--- a/clang/lib/Sema/CMakeLists.txt
+++ b/clang/lib/Sema/CMakeLists.txt
@@ -26,6 +26,7 @@ add_clang_library(clangSema
JumpDiagnostics.cpp
MultiplexExternalSemaSource.cpp
ParsedAttr.cpp
+ ParseHLSLRootSignature.cpp
Scope.cpp
ScopeInfo.cpp
Sema.cpp
diff --git a/clang/lib/Parse/ParseHLSLRootSignature.cpp b/clang/lib/Sema/ParseHLSLRootSignature.cpp
similarity index 99%
rename from clang/lib/Parse/ParseHLSLRootSignature.cpp
rename to clang/lib/Sema/ParseHLSLRootSignature.cpp
index 042aedbf1af52..87b5022cb0abe 100644
--- a/clang/lib/Parse/ParseHLSLRootSignature.cpp
+++ b/clang/lib/Sema/ParseHLSLRootSignature.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Parse/ParseHLSLRootSignature.h"
+#include "clang/Sema/ParseHLSLRootSignature.h"
#include "clang/Lex/LiteralSupport.h"
diff --git a/clang/unittests/CMakeLists.txt b/clang/unittests/CMakeLists.txt
index f3823ba309420..580533a97d700 100644
--- a/clang/unittests/CMakeLists.txt
+++ b/clang/unittests/CMakeLists.txt
@@ -49,7 +49,6 @@ endfunction()
add_subdirectory(Basic)
add_subdirectory(Lex)
-add_subdirectory(Parse)
add_subdirectory(Driver)
if(CLANG_ENABLE_STATIC_ANALYZER)
add_subdirectory(Analysis)
diff --git a/clang/unittests/Parse/CMakeLists.txt b/clang/unittests/Parse/CMakeLists.txt
deleted file mode 100644
index 2a31be625042e..0000000000000
--- a/clang/unittests/Parse/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-set(LLVM_LINK_COMPONENTS
- Support
- )
-add_clang_unittest(ParseTests
- ParseHLSLRootSignatureTest.cpp
- )
-clang_target_link_libraries(ParseTests
- PRIVATE
- clangAST
- clangBasic
- clangLex
- clangParse
- clangSema
- )
-target_link_libraries(ParseTests
- PRIVATE
- LLVMTestingAnnotations
- LLVMTestingSupport
- clangTesting
- )
diff --git a/clang/unittests/Sema/CMakeLists.txt b/clang/unittests/Sema/CMakeLists.txt
index acc76c932afeb..a5c6b44926460 100644
--- a/clang/unittests/Sema/CMakeLists.txt
+++ b/clang/unittests/Sema/CMakeLists.txt
@@ -3,6 +3,7 @@ add_clang_unittest(SemaTests
CodeCompleteTest.cpp
HeuristicResolverTest.cpp
GslOwnerPointerInference.cpp
+ ParseHLSLRootSignatureTest.cpp
SemaLookupTest.cpp
SemaNoloadLookupTest.cpp
CLANG_LIBS
@@ -10,6 +11,7 @@ add_clang_unittest(SemaTests
clangASTMatchers
clangBasic
clangFrontend
+ clangLex
clangParse
clangSema
clangSerialization
diff --git a/clang/unittests/Parse/ParseHLSLRootSignatureTest.cpp b/clang/unittests/Sema/ParseHLSLRootSignatureTest.cpp
similarity index 99%
rename from clang/unittests/Parse/ParseHLSLRootSignatureTest.cpp
rename to clang/unittests/Sema/ParseHLSLRootSignatureTest.cpp
index 2d4e37463bef3..76c437689c4d3 100644
--- a/clang/unittests/Parse/ParseHLSLRootSignatureTest.cpp
+++ b/clang/unittests/Sema/ParseHLSLRootSignatureTest.cpp
@@ -21,7 +21,7 @@
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Lex/LexHLSLRootSignature.h"
-#include "clang/Parse/ParseHLSLRootSignature.h"
+#include "clang/Sema/ParseHLSLRootSignature.h"
#include "gtest/gtest.h"
using namespace clang;
|
HLSLRootSignatureParser into clangSemaHLSLRootSignatureParser into clangSema
92d1d83 to
a9f7a77
Compare
Noting:
Currently,
HLSLRootSignatureParseris defined inclangParse, as it would naturally seem an appropriate place to place.Surprisingly,
clangParsehas a dependency onclangSema. So we can't introduce a dependency ofclangSemaontoclangParse.Given the users of
HLSLRootSignatureParserwill beSemaHLSLwhen parsing from source andclangFrontendwhen we are parsing as a command line argument.Therefore, we are required to move this out of
clangParseso thatclangSemacan reference it.This commit moves
HLSLRootSignatureParserintoclangSemaso it can be linked to all its dependencies (clangFrontendalready depends onclangSema)