summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-compiler.cpp
diff options
context:
space:
mode:
authorDietrich Geisler <dag368@cornell.edu>2020-07-20 14:53:23 -0400
committerGitHub <noreply@github.com>2020-07-20 11:53:23 -0700
commit115920406ebd747e02e1e6a8e4595f7d88eef0d9 (patch)
treea230b6358b35569da5f588d733643198ff38293f /source/slang/slang-compiler.cpp
parent975c5db3f0a71bc93369a321318e7d3b43001ff5 (diff)
Multiple Entry Point Backend (#1437)
* Multiple Entry Point Backend This PR introduces changes to the IR linking, emitting, and options for multiple entry points. Specifically, this PR updates several locations to support a (potentially empty) list of entry points, adding list infrastructure and looping over entry points as appropriate. * Formatting change * Updated unknown target case to not require an entry point * Formatting and list consts updates Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-compiler.cpp')
-rwxr-xr-xsource/slang/slang-compiler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp
index 03fb39135..c643f825a 100755
--- a/source/slang/slang-compiler.cpp
+++ b/source/slang/slang-compiler.cpp
@@ -622,7 +622,7 @@ namespace Slang
}
else
{
- return emitEntryPointSourceFromIR(
+ return emitEntryPointsSourceFromIR(
compileRequest,
entryPointIndices,
target,
@@ -1322,10 +1322,10 @@ SlangResult dissassembleDXILUsingDXC(
/* This is more convoluted than the other scenarios, because when we invoke C/C++ compiler we would ideally like
to use the original file. We want to do this because we want includes relative to the source file to work, and
for that to work most easily we want to use the original file, if there is one */
- // Note also that we require there to be only one entry point to use a translation unit
- // TODO(DG): Review this assertion later
- if (isPassThroughEnabled(endToEndReq) && entryPointIndices.getCount() == 1)
+ if (isPassThroughEnabled(endToEndReq))
{
+ // TODO(DG): Review this assertion later
+ SLANG_ASSERT(entryPointIndices.getCount() == 1);
auto translationUnit = getPassThroughTranslationUnit(endToEndReq, entryPointIndices[0]);
// If it's pass through we accumulate the preprocessor definitions.
for (auto& define : translationUnit->compileRequest->preprocessorDefinitions)