summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 1de94bb14..9f64edc7f 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -19,10 +19,8 @@
using namespace CoreLib::Basic;
using namespace CoreLib::IO;
-using namespace Slang::Compiler;
namespace Slang {
-namespace Compiler {
static void stdlibDiagnosticCallback(
char const* message,
@@ -603,16 +601,16 @@ void Session::addBuiltinSource(
loadedModuleCode.Add(syntax);
}
-}}
+}
// implementation of C interface
-#define SESSION(x) reinterpret_cast<Slang::Compiler::Session *>(x)
-#define REQ(x) reinterpret_cast<Slang::Compiler::CompileRequest*>(x)
+#define SESSION(x) reinterpret_cast<Slang::Session *>(x)
+#define REQ(x) reinterpret_cast<Slang::CompileRequest*>(x)
SLANG_API SlangSession* spCreateSession(const char * cacheDir)
{
- return reinterpret_cast<SlangSession *>(new Slang::Compiler::Session((cacheDir ? true : false), cacheDir));
+ return reinterpret_cast<SlangSession *>(new Slang::Session((cacheDir ? true : false), cacheDir));
}
SLANG_API void spDestroySession(
@@ -642,7 +640,7 @@ SLANG_API SlangCompileRequest* spCreateCompileRequest(
SlangSession* session)
{
auto s = SESSION(session);
- auto req = new Slang::Compiler::CompileRequest(s);
+ auto req = new Slang::CompileRequest(s);
return reinterpret_cast<SlangCompileRequest*>(req);
}
@@ -668,14 +666,14 @@ SLANG_API void spSetCodeGenTarget(
SlangCompileRequest* request,
int target)
{
- REQ(request)->Options.Target = (CodeGenTarget)target;
+ REQ(request)->Options.Target = (Slang::CodeGenTarget)target;
}
SLANG_API void spSetPassThrough(
SlangCompileRequest* request,
SlangPassThrough passThrough)
{
- REQ(request)->Options.passThrough = PassThroughMode(passThrough);
+ REQ(request)->Options.passThrough = Slang::PassThroughMode(passThrough);
}
SLANG_API void spSetDiagnosticCallback(
@@ -723,7 +721,7 @@ SLANG_API int spAddTranslationUnit(
auto req = REQ(request);
return req->addTranslationUnit(
- SourceLanguage(language),
+ Slang::SourceLanguage(language),
name ? name : "");
}
@@ -781,7 +779,7 @@ SLANG_API SlangProfileID spFindProfile(
SlangSession* session,
char const* name)
{
- return Profile::LookUp(name).raw;
+ return Slang::Profile::LookUp(name).raw;
}
SLANG_API int spAddTranslationUnitEntryPoint(
@@ -800,7 +798,7 @@ SLANG_API int spAddTranslationUnitEntryPoint(
return req->addTranslationUnitEntryPoint(
translationUnitIndex,
name,
- Profile(Profile::RawVal(profile)));
+ Slang::Profile(Slang::Profile::RawVal(profile)));
}