Skip to content

Commit

Permalink
Avoid requiring C++20 (#2600)
Browse files Browse the repository at this point in the history
bit_ceil requires C++20. Use llvm::bit_ceil to avoid this requirement.

Signed-off-by: Lu, John <john.lu@intel.com>
  • Loading branch information
LU-JOHN committed Jun 11, 2024
1 parent 7d6d669 commit aab92ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/SPIRV/SPIRVToLLVMDbgTran.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,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<llvm::Metadata *, 8> Subscripts;
Subscripts.push_back(getDIBuilder(DebugInst).getOrCreateSubrange(0, Count));
Expand Down

0 comments on commit aab92ec

Please sign in to comment.