summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/Internalize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/IPO/Internalize.cpp')
-rw-r--r--lib/Transforms/IPO/Internalize.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp
index f3adb5692f1..453b4945e73 100644
--- a/lib/Transforms/IPO/Internalize.cpp
+++ b/lib/Transforms/IPO/Internalize.cpp
@@ -28,20 +28,19 @@ using namespace llvm;
STATISTIC(NumFunctions, "Number of functions internalized");
STATISTIC(NumGlobals , "Number of global vars internalized");
-namespace {
-
- // APIFile - A file which contains a list of symbols that should not be marked
- // external.
- static cl::opt<std::string>
- APIFile("internalize-public-api-file", cl::value_desc("filename"),
- cl::desc("A file containing list of symbol names to preserve"));
+// APIFile - A file which contains a list of symbols that should not be marked
+// external.
+static cl::opt<std::string>
+APIFile("internalize-public-api-file", cl::value_desc("filename"),
+ cl::desc("A file containing list of symbol names to preserve"));
- // APIList - A list of symbols that should not be marked internal.
- static cl::list<std::string>
- APIList("internalize-public-api-list", cl::value_desc("list"),
- cl::desc("A list of symbol names to preserve"),
- cl::CommaSeparated);
+// APIList - A list of symbols that should not be marked internal.
+static cl::list<std::string>
+APIList("internalize-public-api-list", cl::value_desc("list"),
+ cl::desc("A list of symbol names to preserve"),
+ cl::CommaSeparated);
+namespace {
class VISIBILITY_HIDDEN InternalizePass : public ModulePass {
std::set<std::string> ExternalNames;
bool DontInternalize;
@@ -52,10 +51,12 @@ namespace {
void LoadFile(const char *Filename);
virtual bool runOnModule(Module &M);
};
- char InternalizePass::ID = 0;
- RegisterPass<InternalizePass> X("internalize", "Internalize Global Symbols");
} // end anonymous namespace
+char InternalizePass::ID = 0;
+static RegisterPass<InternalizePass>
+X("internalize", "Internalize Global Symbols");
+
InternalizePass::InternalizePass(bool InternalizeEverything)
: ModulePass((intptr_t)&ID), DontInternalize(false){
if (!APIFile.empty()) // If a filename is specified, use it