From 2da0c11e30977ae9651e6cfa0dd4fcd5f15986e6 Mon Sep 17 00:00:00 2001 From: Bjorn Pettersson Date: Fri, 14 Aug 2020 15:58:04 +0200 Subject: [PATCH] [Orc] Fix werror for unused variable in noasserts build --- include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h index f35fc6d83ff..b255ddd6416 100644 --- a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h +++ b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h @@ -408,7 +408,9 @@ public: return errorCodeToError(EC); char *SlabAddr = static_cast(HostAllocation.base()); +#ifndef NDEBUG char *SlabAddrEnd = SlabAddr + HostAllocation.allocatedSize(); +#endif // Allocate segment memory from the slab. for (auto &KV : Request) {