[llvm] 731f991 - [ORC] Attempt to work around compile failure on some bots.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 11 22:25:57 PDT 2021


Author: Lang Hames
Date: 2021-10-11T22:23:59-07:00
New Revision: 731f991cdc4f6683b0ca9a5d6184d9e4e84f63e4

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

LOG: [ORC] Attempt to work around compile failure on some bots.

See e.g. https://lab.llvm.org/buildbot/#/builders/193/builds/98.

I think this failure is related to a C++ standard defect, 1397 --"Class
completeness in non-static data member initializers" [1]. If so, moving
to C++98 initialization should work around the issue.

[1] http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1397

Added: 
    

Modified: 
    llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h b/llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h
index 2cb676259a450..554012a4dacf7 100644
--- a/llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h
+++ b/llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h
@@ -251,14 +251,17 @@ class BasicLayout {
     friend class BasicLayout;
 
   public:
+    Segment()
+        : ContentSize(0), ZeroFillSize(0), Addr(0), WorkingMem(nullptr),
+          NextWorkingMemOffset(0) {}
     Align Alignment;
-    size_t ContentSize = 0;
-    uint64_t ZeroFillSize = 0;
-    JITTargetAddress Addr = 0;
-    char *WorkingMem;
+    size_t ContentSize;
+    uint64_t ZeroFillSize;
+    JITTargetAddress Addr;
+    char *WorkingMem = nullptr;
 
   private:
-    size_t NextWorkingMemOffset = 0;
+    size_t NextWorkingMemOffset;
     std::vector<Block *> ContentBlocks, ZeroFillBlocks;
   };
 


        


More information about the llvm-commits mailing list