diff --git a/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h b/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h --- a/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h +++ b/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h @@ -354,13 +354,13 @@ }; // Align an address to conform with block alignment requirements. -inline uint64_t alignToBlock(uint64_t Addr, Block &B) { +inline uint64_t alignToBlock(uint64_t Addr, const Block &B) { uint64_t Delta = (B.getAlignmentOffset() - Addr) % B.getAlignment(); return Addr + Delta; } // Align a orc::ExecutorAddr to conform with block alignment requirements. -inline orc::ExecutorAddr alignToBlock(orc::ExecutorAddr Addr, Block &B) { +inline orc::ExecutorAddr alignToBlock(orc::ExecutorAddr Addr, const Block &B) { return orc::ExecutorAddr(alignToBlock(Addr.getValue(), B)); }