Skip to content

Commit e83adfe

Browse files
authored
[SPIRV] Silence unused variable warnings (#95492)
This change marks a few variable declarations as [[maybe_unused]] to silence unused variable warnings.
1 parent dfde077 commit e83adfe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/Target/SPIRV/Analysis/SPIRVConvergenceRegionAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ ConvergenceRegion::ConvergenceRegion(
138138
SmallPtrSet<BasicBlock *, 8> &&Blocks, SmallPtrSet<BasicBlock *, 2> &&Exits)
139139
: DT(DT), LI(LI), ConvergenceToken(ConvergenceToken), Entry(Entry),
140140
Exits(std::move(Exits)), Blocks(std::move(Blocks)) {
141-
for (auto *BB : this->Exits)
141+
for ([[maybe_unused]] auto *BB : this->Exits)
142142
assert(this->Blocks.count(BB) != 0);
143143
assert(this->Blocks.count(this->Entry) != 0);
144144
}

llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2418,7 +2418,7 @@ Type *parseBuiltinCallArgumentBaseType(const StringRef DemangledCall,
24182418
if (hasBuiltinTypePrefix(TypeStr)) {
24192419
// OpenCL builtin types in demangled call strings have the following format:
24202420
// e.g. ocl_image2d_ro
2421-
bool IsOCLBuiltinType = TypeStr.consume_front("ocl_");
2421+
[[maybe_unused]] bool IsOCLBuiltinType = TypeStr.consume_front("ocl_");
24222422
assert(IsOCLBuiltinType && "Invalid OpenCL builtin prefix");
24232423

24242424
// Check if this is pointer to a builtin type and not just pointer

0 commit comments

Comments
 (0)