From 22f4d60cd1c615e0a40075942206538f5bea7ee5 Mon Sep 17 00:00:00 2001 From: LU-JOHN Date: Tue, 11 Jun 2024 04:54:29 -0500 Subject: [PATCH] Avoid requiring C++20 (#2600) bit_ceil requires C++20. Use llvm::bit_ceil to avoid this requirement. Signed-off-by: Lu, John --- lib/SPIRV/SPIRVToLLVMDbgTran.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SPIRV/SPIRVToLLVMDbgTran.cpp b/lib/SPIRV/SPIRVToLLVMDbgTran.cpp index b6e6b10ef6..4660b4ac44 100644 --- a/lib/SPIRV/SPIRVToLLVMDbgTran.cpp +++ b/lib/SPIRV/SPIRVToLLVMDbgTran.cpp @@ -490,7 +490,7 @@ SPIRVToLLVMDbgTran::transTypeVector(const SPIRVExtInst *DebugInst) { // Clang rounds up the memory size of vectors to a power of 2. // Vulkan allows vec3 to have a memory size of 12, but in RenderDoc memory // size is not derived from debug info. - uint64_t Size = getDerivedSizeInBits(BaseTy) * bit_ceil(Count); + uint64_t Size = getDerivedSizeInBits(BaseTy) * llvm::bit_ceil(Count); SmallVector Subscripts; Subscripts.push_back(getDIBuilder(DebugInst).getOrCreateSubrange(0, Count));