[PATCH] D129131: Remove uses of llvm_shutdown
efriedma added inline comments. Comment at: polly/lib/External/isl/interface/extract_interface.cc:590 delete Clang; - llvm::llvm_shutdown(); nhaehnle wrote: > Meinersbur wrote: > > This file is imported from the upstream project > > (https://repo.or.cz/isl.git/blob/295cf91923295ca694e9e4433a0b818150421bee:/interface/extract_interface.cc#l590) > > and this change will be lost when synchronizing with it. However, this > > file is also not used within LLVM. I recommend to just keep as-is. > Thanks, will do. I think you missed the other change in this file? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129131/new/ https://reviews.llvm.org/D129131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D129131: Remove uses of llvm_shutdown
nhaehnle updated this revision to Diff 449609. nhaehnle added a comment. Address review comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129131/new/ https://reviews.llvm.org/D129131 Files: bolt/tools/driver/llvm-bolt.cpp bolt/tools/merge-fdata/merge-fdata.cpp clang/include/clang/Frontend/CompilerInstance.h clang/tools/clang-repl/ClangRepl.cpp clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp clang/unittests/Interpreter/InterpreterTest.cpp clang/utils/TableGen/TableGen.cpp libclc/utils/prepare-builtins.cpp lldb/tools/driver/Driver.cpp lldb/tools/lldb-test/lldb-test.cpp lldb/unittests/Utility/LogTest.cpp lldb/utils/TableGen/LLDBTableGen.cpp llvm/examples/BrainF/BrainFDriver.cpp llvm/examples/HowToUseJIT/HowToUseJIT.cpp llvm/include/llvm/PassRegistry.h llvm/include/llvm/Support/DynamicLibrary.h llvm/include/llvm/Support/InitLLVM.h llvm/lib/IR/Pass.cpp llvm/lib/Support/InitLLVM.cpp llvm/lib/Support/Unix/DynamicLibrary.inc llvm/lib/Support/Unix/Signals.inc llvm/lib/Support/Windows/DynamicLibrary.inc llvm/tools/gold/gold-plugin.cpp llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp llvm/utils/KillTheDoctor/KillTheDoctor.cpp mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp polly/lib/External/isl/interface/extract_interface.cc Index: polly/lib/External/isl/interface/extract_interface.cc === --- polly/lib/External/isl/interface/extract_interface.cc +++ polly/lib/External/isl/interface/extract_interface.cc @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include Index: mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp === --- mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp +++ mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp @@ -62,7 +62,6 @@ } int main(int argc, char **argv) { - llvm::llvm_shutdown_obj x; registerPassManagerCLOptions(); llvm::InitLLVM y(argc, argv); Index: llvm/utils/KillTheDoctor/KillTheDoctor.cpp === --- llvm/utils/KillTheDoctor/KillTheDoctor.cpp +++ llvm/utils/KillTheDoctor/KillTheDoctor.cpp @@ -36,7 +36,6 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Path.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Signals.h" @@ -297,7 +296,6 @@ // Print a stack trace if we signal out. sys::PrintStackTraceOnErrorSignal(argv[0]); PrettyStackTraceProgram X(argc, argv); - llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. ToolName = argv[0]; Index: llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp === --- llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp +++ llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp @@ -9,7 +9,6 @@ #include "llvm/Support/DynamicLibrary.h" #include "llvm/Config/config.h" #include "llvm/Support/FileSystem.h" -#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Path.h" #include "gtest/gtest.h" @@ -59,7 +58,6 @@ TEST(DynamicLibrary, Overload) { { std::string Err; -llvm_shutdown_obj Shutdown; DynamicLibrary DL = DynamicLibrary::getPermanentLibrary(LibPath().c_str(), &Err); EXPECT_TRUE(DL.isValid()); @@ -109,9 +107,6 @@ } EXPECT_TRUE(FuncPtr(DynamicLibrary::SearchForAddressOfSymbol( "TestA")) == nullptr); - - // Check serach ordering is reset to default after call to llvm_shutdown - EXPECT_EQ(DynamicLibrary::SearchOrder, DynamicLibrary::SO_Linker); } TEST(DynamicLibrary, Shutdown) { @@ -119,7 +114,6 @@ std::vector Order; { std::string Err; -llvm_shutdown_obj Shutdown; DynamicLibrary DL = DynamicLibrary::getPermanentLibrary(LibPath(A).c_str(), &Err); EXPECT_TRUE(DL.isValid()); Index: llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp === --- llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp +++ llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp @@ -14,7 +14,6 @@ #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/Support/DynamicLibrary.h" -#include "llvm/Support/ManagedStatic.h" #include "gtest/gtest.h" using namespace llvm; @@ -22,9 +21,6 @@ namespace { class ExecutionEngineTest : public testing::Test { -private: - llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. - protected: ExecutionEngineTest() { auto Owner = std::make_unique("", Context); Index: llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
[PATCH] D129131: Remove uses of llvm_shutdown
nhaehnle added inline comments. Comment at: polly/lib/External/isl/interface/extract_interface.cc:590 delete Clang; - llvm::llvm_shutdown(); Meinersbur wrote: > This file is imported from the upstream project > (https://repo.or.cz/isl.git/blob/295cf91923295ca694e9e4433a0b818150421bee:/interface/extract_interface.cc#l590) > and this change will be lost when synchronizing with it. However, this file > is also not used within LLVM. I recommend to just keep as-is. Thanks, will do. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129131/new/ https://reviews.llvm.org/D129131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D129131: Remove uses of llvm_shutdown
Meinersbur added inline comments. Comment at: polly/lib/External/isl/interface/extract_interface.cc:590 delete Clang; - llvm::llvm_shutdown(); This file is imported from the upstream project (https://repo.or.cz/isl.git/blob/295cf91923295ca694e9e4433a0b818150421bee:/interface/extract_interface.cc#l590) and this change will be lost when synchronizing with it. However, this file is also not used within LLVM. I recommend to just keep as-is. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129131/new/ https://reviews.llvm.org/D129131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D129131: Remove uses of llvm_shutdown
nhaehnle updated this revision to Diff 447708. nhaehnle added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129131/new/ https://reviews.llvm.org/D129131 Files: bolt/tools/driver/llvm-bolt.cpp bolt/tools/merge-fdata/merge-fdata.cpp clang/include/clang/Frontend/CompilerInstance.h clang/tools/clang-repl/ClangRepl.cpp clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp clang/unittests/Interpreter/InterpreterTest.cpp clang/utils/TableGen/TableGen.cpp libclc/utils/prepare-builtins.cpp lldb/tools/driver/Driver.cpp lldb/tools/lldb-test/lldb-test.cpp lldb/unittests/Utility/LogTest.cpp lldb/utils/TableGen/LLDBTableGen.cpp llvm/examples/BrainF/BrainFDriver.cpp llvm/examples/HowToUseJIT/HowToUseJIT.cpp llvm/include/llvm/PassRegistry.h llvm/include/llvm/Support/DynamicLibrary.h llvm/include/llvm/Support/InitLLVM.h llvm/lib/IR/Pass.cpp llvm/lib/Support/InitLLVM.cpp llvm/lib/Support/Unix/DynamicLibrary.inc llvm/lib/Support/Unix/Signals.inc llvm/lib/Support/Windows/DynamicLibrary.inc llvm/tools/gold/gold-plugin.cpp llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp llvm/utils/KillTheDoctor/KillTheDoctor.cpp mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp polly/lib/External/isl/interface/extract_interface.cc Index: polly/lib/External/isl/interface/extract_interface.cc === --- polly/lib/External/isl/interface/extract_interface.cc +++ polly/lib/External/isl/interface/extract_interface.cc @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -587,7 +586,6 @@ delete sema; delete Clang; - llvm::llvm_shutdown(); if (Diags.hasErrorOccurred()) return EXIT_FAILURE; Index: mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp === --- mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp +++ mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp @@ -62,7 +62,6 @@ } int main(int argc, char **argv) { - llvm::llvm_shutdown_obj x; registerPassManagerCLOptions(); llvm::InitLLVM y(argc, argv); Index: llvm/utils/KillTheDoctor/KillTheDoctor.cpp === --- llvm/utils/KillTheDoctor/KillTheDoctor.cpp +++ llvm/utils/KillTheDoctor/KillTheDoctor.cpp @@ -36,7 +36,6 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Path.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Signals.h" @@ -297,7 +296,6 @@ // Print a stack trace if we signal out. sys::PrintStackTraceOnErrorSignal(argv[0]); PrettyStackTraceProgram X(argc, argv); - llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. ToolName = argv[0]; Index: llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp === --- llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp +++ llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp @@ -9,7 +9,6 @@ #include "llvm/Support/DynamicLibrary.h" #include "llvm/Config/config.h" #include "llvm/Support/FileSystem.h" -#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Path.h" #include "gtest/gtest.h" @@ -59,7 +58,6 @@ TEST(DynamicLibrary, Overload) { { std::string Err; -llvm_shutdown_obj Shutdown; DynamicLibrary DL = DynamicLibrary::getPermanentLibrary(LibPath().c_str(), &Err); EXPECT_TRUE(DL.isValid()); @@ -109,9 +107,6 @@ } EXPECT_TRUE(FuncPtr(DynamicLibrary::SearchForAddressOfSymbol( "TestA")) == nullptr); - - // Check serach ordering is reset to default after call to llvm_shutdown - EXPECT_EQ(DynamicLibrary::SearchOrder, DynamicLibrary::SO_Linker); } TEST(DynamicLibrary, Shutdown) { @@ -119,7 +114,6 @@ std::vector Order; { std::string Err; -llvm_shutdown_obj Shutdown; DynamicLibrary DL = DynamicLibrary::getPermanentLibrary(LibPath(A).c_str(), &Err); EXPECT_TRUE(DL.isValid()); Index: llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp === --- llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp +++ llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp @@ -14,7 +14,6 @@ #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/Support/DynamicLibrary.h" -#include "llvm/Support/ManagedStatic.h" #include "gtest/gtest.h" using namespace llvm; @@ -22,9 +21,6 @@ namespace { class ExecutionEngineTest : public testing::Test { -private: - llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. - protected: ExecutionEn
[PATCH] D129131: Remove uses of llvm_shutdown
nhaehnle created this revision. nhaehnle added reviewers: efriedma, lattner. Herald added a reviewer: bollu. Herald added subscribers: anlunx, bzcheeseman, ayermolo, sdasgup3, wenzhicui, wrengr, dcaballe, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, jvesely, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini, hiraditya. Herald added a reviewer: rafauler. Herald added a reviewer: Amir. Herald added a reviewer: maksfb. Herald added a project: All. nhaehnle requested review of this revision. Herald added subscribers: lldb-commits, cfe-commits, yota9, stephenneuendorffer, nicolasvasilache. Herald added projects: clang, LLDB, MLIR, LLVM. With the removal of ManagedStatic, llvm_shutdown will be removed as well. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D129131 Files: bolt/tools/driver/llvm-bolt.cpp bolt/tools/merge-fdata/merge-fdata.cpp clang/include/clang/Frontend/CompilerInstance.h clang/tools/clang-repl/ClangRepl.cpp clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp clang/unittests/Interpreter/InterpreterTest.cpp clang/utils/TableGen/TableGen.cpp libclc/utils/prepare-builtins.cpp lldb/tools/driver/Driver.cpp lldb/tools/lldb-test/lldb-test.cpp lldb/unittests/Utility/LogTest.cpp lldb/utils/TableGen/LLDBTableGen.cpp llvm/examples/BrainF/BrainFDriver.cpp llvm/examples/HowToUseJIT/HowToUseJIT.cpp llvm/include/llvm/PassRegistry.h llvm/include/llvm/Support/DynamicLibrary.h llvm/include/llvm/Support/InitLLVM.h llvm/lib/IR/Pass.cpp llvm/lib/Support/InitLLVM.cpp llvm/lib/Support/Unix/DynamicLibrary.inc llvm/lib/Support/Unix/Signals.inc llvm/lib/Support/Windows/DynamicLibrary.inc llvm/tools/gold/gold-plugin.cpp llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp llvm/utils/KillTheDoctor/KillTheDoctor.cpp mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp polly/lib/External/isl/interface/extract_interface.cc Index: polly/lib/External/isl/interface/extract_interface.cc === --- polly/lib/External/isl/interface/extract_interface.cc +++ polly/lib/External/isl/interface/extract_interface.cc @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -587,7 +586,6 @@ delete sema; delete Clang; - llvm::llvm_shutdown(); if (Diags.hasErrorOccurred()) return EXIT_FAILURE; Index: mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp === --- mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp +++ mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp @@ -62,7 +62,6 @@ } int main(int argc, char **argv) { - llvm::llvm_shutdown_obj x; registerPassManagerCLOptions(); llvm::InitLLVM y(argc, argv); Index: llvm/utils/KillTheDoctor/KillTheDoctor.cpp === --- llvm/utils/KillTheDoctor/KillTheDoctor.cpp +++ llvm/utils/KillTheDoctor/KillTheDoctor.cpp @@ -36,7 +36,6 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Path.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Signals.h" @@ -297,7 +296,6 @@ // Print a stack trace if we signal out. sys::PrintStackTraceOnErrorSignal(argv[0]); PrettyStackTraceProgram X(argc, argv); - llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. ToolName = argv[0]; Index: llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp === --- llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp +++ llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp @@ -9,7 +9,6 @@ #include "llvm/Support/DynamicLibrary.h" #include "llvm/Config/config.h" #include "llvm/Support/FileSystem.h" -#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Path.h" #include "gtest/gtest.h" @@ -59,7 +58,6 @@ TEST(DynamicLibrary, Overload) { { std::string Err; -llvm_shutdown_obj Shutdown; DynamicLibrary DL = DynamicLibrary::getPermanentLibrary(LibPath().c_str(), &Err); EXPECT_TRUE(DL.isValid()); @@ -109,9 +107,6 @@ } EXPECT_TRUE(FuncPtr(DynamicLibrary::SearchForAddressOfSymbol( "TestA")) == nullptr); - - // Check serach ordering is reset to default after call to llvm_shutdown - EXPECT_EQ(DynamicLibrary::SearchOrder, DynamicLibrary::SO_Linker); } TEST(DynamicLibrary, Shutdown) { @@ -119,7 +114,6 @@ std::vector Order; { std::string Err; -llvm_shutdown_obj Shutdown; DynamicLibrary DL = DynamicLibrary::getPermanentLibrary(LibPath(A).c_str(), &Err); EXPECT_TRUE(DL.isVal