[llvm] 07a5b7e - [examples] Fix incomplete_type on ZLinux when compiling RemoteJITUtils.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 1 22:19:02 PDT 2021


Author: Lang Hames
Date: 2021-08-02T15:15:15+10:00
New Revision: 07a5b7e5b13d231725a2109c0768547d1924683b

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

LOG: [examples] Fix incomplete_type on ZLinux when compiling RemoteJITUtils.

When compiling on ZLinux, we got this error:

/llvm-project/llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/ \
RemoteJITUtils.h:80:65:   required from here...
/usr/include/c++/7/bits/unique_ptr.h:76:22: error: invalid application of
'sizeof' to incomplete type 'llvm::orc::RemoteExecutorProcessControl'
  static_assert(sizeof(_Tp)>0,

This patch just removes nullptr from the initialization of
std::unique_ptr<RemoteExecutorProcessControl> to avoid the issue.

Patch by Tung D. Le (tung at jp.ibm.com). Thanks Tung!

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D107247

Added: 
    

Modified: 
    llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/RemoteJITUtils.h

Removed: 
    


################################################################################
diff  --git a/llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/RemoteJITUtils.h b/llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/RemoteJITUtils.h
index 5b15b1e9964f7..2570f90104160 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/RemoteJITUtils.h
+++ b/llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/RemoteJITUtils.h
@@ -77,7 +77,7 @@ class JITLinkExecutor {
   virtual ~JITLinkExecutor();
 
 protected:
-  std::unique_ptr<RemoteExecutorProcessControl> OwnedEPC{nullptr};
+  std::unique_ptr<RemoteExecutorProcessControl> OwnedEPC;
   RemoteExecutorProcessControl *EPC{nullptr};
 
   JITLinkExecutor();


        


More information about the llvm-commits mailing list