Skip to content

Commit f1e0207

Browse files
LU-JOHNsys-ce-bb
authored andcommitted
Avoid requiring C++20 (#2600)
bit_ceil requires C++20. Use llvm::bit_ceil to avoid this requirement. Signed-off-by: Lu, John <[email protected]> Original commit: KhronosGroup/SPIRV-LLVM-Translator@aab92ecc22e2f1e
1 parent 170f860 commit f1e0207

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm-spirv/lib/SPIRV/SPIRVToLLVMDbgTran.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ SPIRVToLLVMDbgTran::transTypeVector(const SPIRVExtInst *DebugInst) {
491491
// Clang rounds up the memory size of vectors to a power of 2.
492492
// Vulkan allows vec3 to have a memory size of 12, but in RenderDoc memory
493493
// size is not derived from debug info.
494-
uint64_t Size = getDerivedSizeInBits(BaseTy) * bit_ceil(Count);
494+
uint64_t Size = getDerivedSizeInBits(BaseTy) * llvm::bit_ceil(Count);
495495

496496
SmallVector<llvm::Metadata *, 8> Subscripts;
497497
Subscripts.push_back(getDIBuilder(DebugInst).getOrCreateSubrange(0, Count));

0 commit comments

Comments
 (0)