Skip to content

Commit 909a780

Browse files
committed
Do target check via assert
Signed-off-by: Mikhail Lychkov <[email protected]>
1 parent 59a482e commit 909a780

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,9 +1483,8 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
14831483
// -fsycl-instrument-device-code option was passed. This option can be used
14841484
// only with spir triple.
14851485
if (CodeGenOpts.SPIRITTAnnotations) {
1486-
if (!llvm::Triple(TheModule->getTargetTriple()).isSPIR())
1487-
llvm::report_fatal_error(
1488-
"ITT annotations can only by added to a module with spir target");
1486+
assert(llvm::Triple(TheModule->getTargetTriple()).isSPIR() &&
1487+
"ITT annotations can only by added to a module with spir target");
14891488
MPM.addPass(SPIRITTAnnotationsPass());
14901489
}
14911490

0 commit comments

Comments
 (0)