Skip to content

Commit 43e98f7

Browse files
committed
Add assertion for at-most one SPIR-V output
Signed-off-by: Steffen Larsen <[email protected]>
1 parent 77a7208 commit 43e98f7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sycl/source/detail/online_compiler/online_compiler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ compileToSPIRV(const std::string &Source, sycl::info::device_type DeviceType,
166166
size_t NameLen = strlen(OutputNames[I]);
167167
if (NameLen >= 4 && strstr(OutputNames[I], ".spv") != nullptr &&
168168
Outputs[I] != nullptr) {
169+
assert(SpirV.size() == 0 && "More than one SPIR-V output found.");
169170
SpirV = std::vector<byte>(Outputs[I], Outputs[I] + OutputLengths[I]);
170171
} else if (!strcmp(OutputNames[I], "stdout.log")) {
171172
CompileLog = std::string(reinterpret_cast<const char *>(Outputs[I]));

0 commit comments

Comments
 (0)