[llvm] b395d67 - [Orc] Fix werror for unused variable in noasserts build

Bjorn Pettersson via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 06:58:41 PDT 2020


Author: Bjorn Pettersson
Date: 2020-08-14T15:58:04+02:00
New Revision: b395d67a886c4499fab4e93e2a8cec87b71db15a

URL: https://github.com/llvm/llvm-project/commit/b395d67a886c4499fab4e93e2a8cec87b71db15a
DIFF: https://github.com/llvm/llvm-project/commit/b395d67a886c4499fab4e93e2a8cec87b71db15a.diff

LOG: [Orc] Fix werror for unused variable in noasserts build

Added: 
    

Modified: 
    llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h b/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
index f35fc6d83fff..b255ddd6416c 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
@@ -408,7 +408,9 @@ class OrcRemoteTargetClient
         return errorCodeToError(EC);
 
       char *SlabAddr = static_cast<char *>(HostAllocation.base());
+#ifndef NDEBUG
       char *SlabAddrEnd = SlabAddr + HostAllocation.allocatedSize();
+#endif
 
       // Allocate segment memory from the slab.
       for (auto &KV : Request) {


        


More information about the llvm-commits mailing list