summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-13 05:25:08 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-13 05:25:08 +0000
commit24d3414f061fb9195c2e6470561937d7c6f5fa8a (patch)
tree978045ae9b9a700e401e0adf8188855eb7632083 /llvm/include
parent8eac7ae9ada009e30593da62174b27e13c21c791 (diff)
downloadbcm5719-llvm-24d3414f061fb9195c2e6470561937d7c6f5fa8a.tar.gz
bcm5719-llvm-24d3414f061fb9195c2e6470561937d7c6f5fa8a.zip
Refactor the InternalizePass into a helper class, and expose it through a public free function (NFC)
There is really no reason to require to instanciate a pass manager to internalize. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266167
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Transforms/IPO/Internalize.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/include/llvm/Transforms/IPO/Internalize.h b/llvm/include/llvm/Transforms/IPO/Internalize.h
new file mode 100644
index 00000000000..b51584ae37c
--- /dev/null
+++ b/llvm/include/llvm/Transforms/IPO/Internalize.h
@@ -0,0 +1,27 @@
+//====- llvm/Transforms/IPO/Internalize.h - Internalization API -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_INTERNALIZE_H
+#define LLVM_INTERNALIZE_H
+
+#include "llvm/IR/GlobalValue.h"
+
+#include <functional>
+
+namespace llvm {
+class Module;
+class CallGraph;
+
+bool internalizeModule(
+ Module &TheModule,
+ const std::function<bool(const GlobalValue &)> &MustPreserveGV,
+ CallGraph *CG = nullptr);
+}
+
+#endif // LLVM_INTERNALIZE_H
OpenPOWER on IntegriCloud