Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Don't rely on llvm::make_unique.
authorThomas Munro <tmunro@postgresql.org>
Sun, 25 Aug 2019 01:54:48 +0000 (13:54 +1200)
committerThomas Munro <tmunro@postgresql.org>
Sun, 25 Aug 2019 02:46:55 +0000 (14:46 +1200)
Bleeding-edge LLVM has stopped supplying replacements for various
C++14 library features, for people on older C++ versions.  Since we're
not ready to require C++14 yet, just use plain old new instead of
make_unique.  As revealed by buildfarm animal seawasp.

Back-patch to 11.

Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/CA%2BhUKGJWG7unNqmkxg7nC5o3o-0p2XP6co4r%3D9epqYMm8UY4Mw%40mail.gmail.com

src/backend/jit/llvm/llvmjit_inline.cpp

index 731030ba660f146d717496a2c8b6aa2647c397c3..aa0473dacd2287594a909a5bc4e5f7e9c726fbe9 100644 (file)
@@ -174,7 +174,7 @@ llvm_inline(LLVMModuleRef M)
 static std::unique_ptr<ImportMapTy>
 llvm_build_inline_plan(llvm::Module *mod)
 {
-   std::unique_ptr<ImportMapTy> globalsToInline = llvm::make_unique<ImportMapTy>();
+   std::unique_ptr<ImportMapTy> globalsToInline(new ImportMapTy());
    FunctionInlineStates functionStates;
    InlineWorkList worklist;