aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Pass.cpp')
-rw-r--r--lib/VMCore/Pass.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp
index 6b941f34996e..a60877db2f62 100644
--- a/lib/VMCore/Pass.cpp
+++ b/lib/VMCore/Pass.cpp
@@ -318,6 +318,8 @@ static PassRegistrar *getPassRegistrar() {
return PassRegistrarObj;
}
+namespace {
+
// FIXME: We use ManagedCleanup to erase the pass registrar on shutdown.
// Unfortunately, passes are registered with static ctors, and having
// llvm_shutdown clear this map prevents successful ressurection after
@@ -329,7 +331,9 @@ void cleanupPassRegistrar(void*) {
PassRegistrarObj = 0;
}
}
-ManagedCleanup<&cleanupPassRegistrar> registrarCleanup;
+ManagedCleanup<&cleanupPassRegistrar> registrarCleanup ATTRIBUTE_USED;
+
+}
// getPassInfo - Return the PassInfo data structure that corresponds to this
// pass...