fix crash on some platforms when opt plugin verif fails
MODIFY
llvm_util/llvm2alive.cpp
llvm_util/llvm2alive.cpp
@@ -608,10 +608,6 @@ initializer::initializer(ostream &os) {
init_llvm_utils(os);
}
-initializer::~initializer() {
- destroy_llvm_utils();
-}
-
optional<IR::Function> llvm2alive(llvm::Function &F,
const llvm::TargetLibraryInfo &TLI) {
return llvm2alive_(F, TLI).run();

MODIFY
llvm_util/llvm2alive.h
llvm_util/llvm2alive.h
@@ -16,7 +16,6 @@ namespace llvm_util {
struct initializer {
initializer(std::ostream &os);
- ~initializer();
};
std::optional<IR::Function> llvm2alive(llvm::Function &F,

MODIFY
llvm_util/utils.cpp
llvm_util/utils.cpp
@@ -205,14 +205,6 @@ void init_llvm_utils(ostream &os) {
ptr_types.emplace_back(make_unique<PtrType>(0));
}
-void destroy_llvm_utils() {
- int_types.clear();
- ptr_types.clear();
- type_cache.clear();
- value_names.clear();
- identifiers.clear();
-}
-
void reset_state(Function &f) {
current_fn = &f;
identifiers.clear();

MODIFY
llvm_util/utils.h
llvm_util/utils.h
@@ -39,6 +39,5 @@ PRINT(llvm::Value)
#undef PRINT
void init_llvm_utils(std::ostream &os);
-void destroy_llvm_utils();
void reset_state(IR::Function &f);
}

fix crash on some platforms when opt plugin verif fails