#include <metal_stdlib> | |
using namespace metal; | |
struct tint_module_vars_struct { | |
const constant int* x; | |
}; | |
#define TINT_ISOLATE_UB(VOLATILE_NAME) \ | |
volatile bool VOLATILE_NAME = true; \ | |
if (VOLATILE_NAME) | |
kernel void tint_symbol(const constant int* x [[buffer(0)]]) { | |
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x=x}; | |
switch((*tint_module_vars.x)) { | |
case 0: | |
{ | |
{ | |
TINT_ISOLATE_UB(tint_volatile_true) while(true) { | |
return; | |
} | |
} | |
break; | |
} | |
default: | |
{ | |
break; | |
} | |
} | |
} |