We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a36faa4 commit fcc219aCopy full SHA for fcc219a
llvm/lib/Target/SPIRV/SPIRVSubtarget.h
@@ -84,8 +84,10 @@ class SPIRVSubtarget : public SPIRVGenSubtargetInfo {
84
unsigned getBound() const { return GR->getBound(); }
85
bool canDirectlyComparePointers() const;
86
void setEnv(SPIRVEnvType E) {
87
- assert(E != Unknown && "Unknown environment is not allowed");
88
- assert(Env == Unknown && "Environment is already set");
+ if (E == Unknown)
+ report_fatal_error("Unknown environment is not allowed.");
89
+ if (Env != Unknown)
90
+ report_fatal_error("Environment is already set.");
91
92
Env = E;
93
}
0 commit comments