summaryrefslogtreecommitdiff
path: root/source/slang
diff options
context:
space:
mode:
authorkaizhangNV <149626564+kaizhangNV@users.noreply.github.com>2024-07-17 12:53:19 -0500
committerGitHub <noreply@github.com>2024-07-17 10:53:19 -0700
commit2db15080085856ed9b5f20642dbb354aac59a888 (patch)
tree4f6558b8c3aac5e5191edaa092230ecb449f4a44 /source/slang
parent7d07bd29fee7dcd74fe73940723effc68f427e67 (diff)
Move the file public header files to `include` dir (#4636)
* Move the file public header files to `include` dir Close the issue (#4635). Move the following headers files to a `include` dir located at root dir of slang repo: slang-com-helper.h -> include/slang-com-helper.h slang-com-ptr.h -> include/slang-com-ptr.h slang-gfx.h -> include/slang-gfx.h slang.h -> include/slang.h Change cmake/SlangTarget.cmake to add include path to every target, and change the source file to use "#include <slang.h>" to include the public headers. The source code update is by the script like follow: ``` fileNames_slang=$(grep -r "\".*slang\.h\"" source/ -l) for fileName in "${fileNames_slang[@]}" do echo "$fileName" sed -i "s/\".*slang\.h\"/\"slang\.h\"/" $fileName done ``` * Fix the test issues * Fix cpu test issues by adding include seach path * Update cmake to not add include path for every target Also change "#include <slang.h>" to "include "slang.h" " to make the coding style consistent with other slang code. * Change public include to private include for unit-test and slang-glslang
Diffstat (limited to 'source/slang')
-rw-r--r--source/slang/slang-artifact-output-util.h2
-rw-r--r--source/slang/slang-ast-reflect.cpp2
-rw-r--r--source/slang/slang-ast-support-types.h2
-rw-r--r--source/slang/slang-compiler-options.h2
-rwxr-xr-xsource/slang/slang-compiler.h4
-rw-r--r--source/slang/slang-content-assist-info.h2
-rw-r--r--source/slang/slang-diagnostics.h2
-rw-r--r--source/slang/slang-ir-inline.h2
-rw-r--r--source/slang/slang-ir-obfuscate-loc.cpp2
-rw-r--r--source/slang/slang-ir-operator-shift-overflow.cpp2
-rw-r--r--source/slang/slang-language-server-auto-format.h2
-rw-r--r--source/slang/slang-language-server-document-symbols.h2
-rw-r--r--source/slang/slang-language-server-inlay-hints.h2
-rw-r--r--source/slang/slang-language-server-semantic-tokens.h2
-rw-r--r--source/slang/slang-language-server.cpp2
-rw-r--r--source/slang/slang-language-server.h2
-rw-r--r--source/slang/slang-lower-to-ir.cpp2
-rw-r--r--source/slang/slang-options.cpp2
-rw-r--r--source/slang/slang-parameter-binding.cpp2
-rw-r--r--source/slang/slang-parameter-binding.h2
-rw-r--r--source/slang/slang-profile.h2
-rw-r--r--source/slang/slang-ref-object-reflect.cpp2
-rw-r--r--source/slang/slang-reflection-api.cpp2
-rw-r--r--source/slang/slang-stdlib.cpp2
-rw-r--r--source/slang/slang-type-layout.h2
-rw-r--r--source/slang/slang-type-system-shared.h2
-rw-r--r--source/slang/slang-value-reflect.cpp2
-rw-r--r--source/slang/slang-workspace-version.h6
-rw-r--r--source/slang/slang.cpp2
29 files changed, 32 insertions, 32 deletions
diff --git a/source/slang/slang-artifact-output-util.h b/source/slang/slang-artifact-output-util.h
index 3c8b2cfc7..13682c579 100644
--- a/source/slang/slang-artifact-output-util.h
+++ b/source/slang/slang-artifact-output-util.h
@@ -6,7 +6,7 @@
#include "../compiler-core/slang-artifact.h"
#include "../compiler-core/slang-diagnostic-sink.h"
-#include "../../slang-com-ptr.h"
+#include "slang-com-ptr.h"
namespace Slang
{
diff --git a/source/slang/slang-ast-reflect.cpp b/source/slang/slang-ast-reflect.cpp
index 66e57a744..a91ec0618 100644
--- a/source/slang/slang-ast-reflect.cpp
+++ b/source/slang/slang-ast-reflect.cpp
@@ -1,4 +1,4 @@
-#include "../../slang.h"
+#include "slang.h"
#include "slang-ast-reflect.h"
diff --git a/source/slang/slang-ast-support-types.h b/source/slang/slang-ast-support-types.h
index 76c638693..f709345d5 100644
--- a/source/slang/slang-ast-support-types.h
+++ b/source/slang/slang-ast-support-types.h
@@ -9,7 +9,7 @@
#include "slang-profile.h"
#include "slang-type-system-shared.h"
-#include "../../slang.h"
+#include "slang.h"
#include "../core/slang-semantic-version.h"
diff --git a/source/slang/slang-compiler-options.h b/source/slang/slang-compiler-options.h
index e1ce21789..dae6d49e5 100644
--- a/source/slang/slang-compiler-options.h
+++ b/source/slang/slang-compiler-options.h
@@ -1,7 +1,7 @@
#ifndef SLANG_COMPILER_OPTIONS_H
#define SLANG_COMPILER_OPTIONS_H
-#include "../../slang.h"
+#include "slang.h"
#include "../core/slang-basic.h"
#include "../core/slang-crypto.h"
#include "slang-generated-capability-defs.h"
diff --git a/source/slang/slang-compiler.h b/source/slang/slang-compiler.h
index e9660f7ed..35b2fcf44 100755
--- a/source/slang/slang-compiler.h
+++ b/source/slang/slang-compiler.h
@@ -21,7 +21,7 @@
#include "../core/slang-file-system.h"
-#include "../../slang-com-ptr.h"
+#include "slang-com-ptr.h"
#include "slang-capability.h"
#include "slang-diagnostics.h"
@@ -35,7 +35,7 @@
#include "../compiler-core/slang-artifact-representation-impl.h"
-#include "../../slang.h"
+#include "slang.h"
namespace Slang
{
diff --git a/source/slang/slang-content-assist-info.h b/source/slang/slang-content-assist-info.h
index 8f4105184..5487a1f69 100644
--- a/source/slang/slang-content-assist-info.h
+++ b/source/slang/slang-content-assist-info.h
@@ -3,7 +3,7 @@
#pragma once
#include "slang-syntax.h"
-#include "../../slang.h"
+#include "slang.h"
namespace Slang
{
diff --git a/source/slang/slang-diagnostics.h b/source/slang/slang-diagnostics.h
index 299b63827..202ee0cf4 100644
--- a/source/slang/slang-diagnostics.h
+++ b/source/slang/slang-diagnostics.h
@@ -8,7 +8,7 @@
#include "../compiler-core/slang-diagnostic-sink.h"
#include "../compiler-core/slang-token.h"
-#include "../../slang.h"
+#include "slang.h"
namespace Slang
{
diff --git a/source/slang/slang-ir-inline.h b/source/slang/slang-ir-inline.h
index 1b37a28ae..acca0a61b 100644
--- a/source/slang/slang-ir-inline.h
+++ b/source/slang/slang-ir-inline.h
@@ -1,7 +1,7 @@
// slang-ir-inline.h
#pragma once
-#include "../../slang-com-helper.h"
+#include "slang-com-helper.h"
#include "core/slang-basic.h"
namespace Slang
diff --git a/source/slang/slang-ir-obfuscate-loc.cpp b/source/slang/slang-ir-obfuscate-loc.cpp
index 79497e7a3..be648596e 100644
--- a/source/slang/slang-ir-obfuscate-loc.cpp
+++ b/source/slang/slang-ir-obfuscate-loc.cpp
@@ -1,7 +1,7 @@
// slang-ir-obfuscate-loc.cpp
#include "slang-ir-obfuscate-loc.h"
-#include "../../slang.h"
+#include "slang.h"
#include "../core/slang-random-generator.h"
#include "../core/slang-stable-hash.h"
diff --git a/source/slang/slang-ir-operator-shift-overflow.cpp b/source/slang/slang-ir-operator-shift-overflow.cpp
index 33ee53262..5f829f05a 100644
--- a/source/slang/slang-ir-operator-shift-overflow.cpp
+++ b/source/slang/slang-ir-operator-shift-overflow.cpp
@@ -1,7 +1,7 @@
// slang-ir-operator-shift-overflow.cpp
#include "slang-ir-operator-shift-overflow.h"
-#include "../../slang.h"
+#include "slang.h"
#include "slang-ir.h"
#include "slang-ir-insts.h"
#include "slang-ir-layout.h"
diff --git a/source/slang/slang-language-server-auto-format.h b/source/slang/slang-language-server-auto-format.h
index e2cf89a25..95cc02764 100644
--- a/source/slang/slang-language-server-auto-format.h
+++ b/source/slang/slang-language-server-auto-format.h
@@ -1,6 +1,6 @@
#pragma once
-#include "../../slang.h"
+#include "slang.h"
#include "../core/slang-basic.h"
#include "slang-workspace-version.h"
diff --git a/source/slang/slang-language-server-document-symbols.h b/source/slang/slang-language-server-document-symbols.h
index 65e84a6b2..6367c199b 100644
--- a/source/slang/slang-language-server-document-symbols.h
+++ b/source/slang/slang-language-server-document-symbols.h
@@ -1,6 +1,6 @@
#pragma once
-#include "../../slang.h"
+#include "slang.h"
#include "../core/slang-basic.h"
#include "slang-ast-all.h"
#include "slang-syntax.h"
diff --git a/source/slang/slang-language-server-inlay-hints.h b/source/slang/slang-language-server-inlay-hints.h
index 50ea67c45..b7dfef98b 100644
--- a/source/slang/slang-language-server-inlay-hints.h
+++ b/source/slang/slang-language-server-inlay-hints.h
@@ -1,6 +1,6 @@
#pragma once
-#include "../../slang.h"
+#include "slang.h"
#include "../core/slang-basic.h"
#include "slang-ast-all.h"
#include "slang-syntax.h"
diff --git a/source/slang/slang-language-server-semantic-tokens.h b/source/slang/slang-language-server-semantic-tokens.h
index 8a736345f..b29da5375 100644
--- a/source/slang/slang-language-server-semantic-tokens.h
+++ b/source/slang/slang-language-server-semantic-tokens.h
@@ -1,6 +1,6 @@
#pragma once
-#include "../../slang.h"
+#include "slang.h"
#include "../core/slang-basic.h"
#include "slang-ast-all.h"
#include "slang-syntax.h"
diff --git a/source/slang/slang-language-server.cpp b/source/slang/slang-language-server.cpp
index 8f71666dd..09b14932c 100644
--- a/source/slang/slang-language-server.cpp
+++ b/source/slang/slang-language-server.cpp
@@ -13,7 +13,7 @@
#include "../core/slang-char-util.h"
#include "../core/slang-string-util.h"
-#include "../../slang-com-helper.h"
+#include "slang-com-helper.h"
#include "../compiler-core/slang-json-native.h"
#include "../compiler-core/slang-json-rpc-connection.h"
#include "../compiler-core/slang-language-server-protocol.h"
diff --git a/source/slang/slang-language-server.h b/source/slang/slang-language-server.h
index 956ad9769..0a157819d 100644
--- a/source/slang/slang-language-server.h
+++ b/source/slang/slang-language-server.h
@@ -1,6 +1,6 @@
#pragma once
#include <chrono>
-#include "../../slang.h"
+#include "slang.h"
#include "../core/slang-range.h"
#include "../compiler-core/slang-json-rpc.h"
#include "../compiler-core/slang-json-rpc-connection.h"
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index d8d573d63..b86b7b177 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -1,7 +1,7 @@
// lower.cpp
#include "slang-lower-to-ir.h"
-#include "../../slang.h"
+#include "slang.h"
#include "../core/slang-random-generator.h"
#include "../core/slang-hash.h"
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 87c9b1192..4670af9df 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -5,7 +5,7 @@
#include "slang-options.h"
-#include "../../slang.h"
+#include "slang.h"
#include "slang-compiler.h"
#include "slang-profile.h"
diff --git a/source/slang/slang-parameter-binding.cpp b/source/slang/slang-parameter-binding.cpp
index 046c35ef9..8b15126db 100644
--- a/source/slang/slang-parameter-binding.cpp
+++ b/source/slang/slang-parameter-binding.cpp
@@ -10,7 +10,7 @@
#include "slang-ir-string-hash.h"
-#include "../../slang.h"
+#include "slang.h"
namespace Slang {
diff --git a/source/slang/slang-parameter-binding.h b/source/slang/slang-parameter-binding.h
index e2530e34e..3bf44f90d 100644
--- a/source/slang/slang-parameter-binding.h
+++ b/source/slang/slang-parameter-binding.h
@@ -4,7 +4,7 @@
#include "../core/slang-basic.h"
#include "slang-syntax.h"
-#include "../../slang.h"
+#include "slang.h"
namespace Slang {
diff --git a/source/slang/slang-profile.h b/source/slang/slang-profile.h
index 55855b91d..d07a4555f 100644
--- a/source/slang/slang-profile.h
+++ b/source/slang/slang-profile.h
@@ -2,7 +2,7 @@
#define SLANG_PROFILE_H_INCLUDED
#include "../core/slang-basic.h"
-#include "../../slang.h"
+#include "slang.h"
#include "slang-capability.h"
namespace Slang
diff --git a/source/slang/slang-ref-object-reflect.cpp b/source/slang/slang-ref-object-reflect.cpp
index f07dcbba7..59c948d38 100644
--- a/source/slang/slang-ref-object-reflect.cpp
+++ b/source/slang/slang-ref-object-reflect.cpp
@@ -1,4 +1,4 @@
-#include "../../slang.h"
+#include "slang.h"
#include "slang-ref-object-reflect.h"
diff --git a/source/slang/slang-reflection-api.cpp b/source/slang/slang-reflection-api.cpp
index 0642caeb6..d0d09f814 100644
--- a/source/slang/slang-reflection-api.cpp
+++ b/source/slang/slang-reflection-api.cpp
@@ -3,7 +3,7 @@
#include "../core/slang-basic.h"
#include "slang-syntax.h"
-#include "../../slang.h"
+#include "slang.h"
#include "slang-compiler.h"
#include "slang-type-layout.h"
diff --git a/source/slang/slang-stdlib.cpp b/source/slang/slang-stdlib.cpp
index 3c8b48e00..dbc358c18 100644
--- a/source/slang/slang-stdlib.cpp
+++ b/source/slang/slang-stdlib.cpp
@@ -349,7 +349,7 @@ namespace Slang
{
const String path = getStdlibPath();
StringBuilder sb;
-#include "glsl.meta.slang.h"
+ #include "glsl.meta.slang.h"
glslLibraryCode = StringBlob::moveCreate(sb);
}
return glslLibraryCode;
diff --git a/source/slang/slang-type-layout.h b/source/slang/slang-type-layout.h
index f29a38435..37c0cd1e7 100644
--- a/source/slang/slang-type-layout.h
+++ b/source/slang/slang-type-layout.h
@@ -6,7 +6,7 @@
#include "slang-profile.h"
#include "slang-syntax.h"
-#include "../../slang.h"
+#include "slang.h"
namespace Slang {
diff --git a/source/slang/slang-type-system-shared.h b/source/slang/slang-type-system-shared.h
index 1c8dd56aa..2f467a05a 100644
--- a/source/slang/slang-type-system-shared.h
+++ b/source/slang/slang-type-system-shared.h
@@ -1,7 +1,7 @@
#ifndef SLANG_TYPE_SYSTEM_SHARED_H
#define SLANG_TYPE_SYSTEM_SHARED_H
-#include "../../slang.h"
+#include "slang.h"
namespace Slang
{
diff --git a/source/slang/slang-value-reflect.cpp b/source/slang/slang-value-reflect.cpp
index 3c19deba4..bcfde06e5 100644
--- a/source/slang/slang-value-reflect.cpp
+++ b/source/slang/slang-value-reflect.cpp
@@ -1,4 +1,4 @@
-#include "../../slang.h"
+#include "slang.h"
#include "slang-value-reflect.h"
diff --git a/source/slang/slang-workspace-version.h b/source/slang/slang-workspace-version.h
index 28d6e1fe2..44ab6b43c 100644
--- a/source/slang/slang-workspace-version.h
+++ b/source/slang/slang-workspace-version.h
@@ -1,8 +1,8 @@
#pragma once
-#include "../../slang-com-helper.h"
-#include "../../slang-com-ptr.h"
-#include "../../slang.h"
+#include "slang-com-helper.h"
+#include "slang-com-ptr.h"
+#include "slang.h"
#include "../core/slang-basic.h"
#include "../core/slang-com-object.h"
#include "../compiler-core/slang-language-server-protocol.h"
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 9827f9c5c..f28d3cdeb 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -1,4 +1,4 @@
-#include "../../slang.h"
+#include "slang.h"
#include "../core/slang-io.h"
#include "../core/slang-string-util.h"