summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-01-05 20:38:27 +0000
committerDuncan Sands <baldrick@free.fr>2009-01-05 20:38:27 +0000
commit2631ac3b5b4c2d7eaf8d1db178dc98071a708ad2 (patch)
treeb153b7e5292cfc83e8b4208322ec9181fb5b35f2 /lib
parent1da5f2dd2ec1b1eea67a25928668f7ea2bd67b96 (diff)
downloadllvm-2631ac3b5b4c2d7eaf8d1db178dc98071a708ad2.tar.gz
llvm-2631ac3b5b4c2d7eaf8d1db178dc98071a708ad2.tar.bz2
llvm-2631ac3b5b4c2d7eaf8d1db178dc98071a708ad2.tar.xz
Remove trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/IPO/Internalize.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp
index 462daab026..5e325ec82d 100644
--- a/lib/Transforms/IPO/Internalize.cpp
+++ b/lib/Transforms/IPO/Internalize.cpp
@@ -73,7 +73,7 @@ InternalizePass::InternalizePass(bool AllButMain)
ExternalNames.insert(APIList.begin(), APIList.end());
}
-InternalizePass::InternalizePass(const std::vector<const char *>&exportList)
+InternalizePass::InternalizePass(const std::vector<const char *>&exportList)
: ModulePass(&ID), AllButMain(false){
for(std::vector<const char *>::const_iterator itr = exportList.begin();
itr != exportList.end(); itr++) {
@@ -85,7 +85,7 @@ void InternalizePass::LoadFile(const char *Filename) {
// Load the APIFile...
std::ifstream In(Filename);
if (!In.good()) {
- cerr << "WARNING: Internalize couldn't load file '" << Filename
+ cerr << "WARNING: Internalize couldn't load file '" << Filename
<< "'! Continuing as if it's empty.\n";
return; // Just continue as if the file were empty
}
@@ -104,7 +104,7 @@ bool InternalizePass::runOnModule(Module &M) {
if (ExternalNames.empty()) {
// Return if we're not in 'all but main' mode and have no external api
if (!AllButMain)
- return false;
+ return false;
// If no list or file of symbols was specified, check to see if there is a
// "main" symbol defined in the module. If so, use it, otherwise do not
// internalize the module, it must be a library or something.
@@ -112,13 +112,13 @@ bool InternalizePass::runOnModule(Module &M) {
Function *MainFunc = M.getFunction("main");
if (MainFunc == 0 || MainFunc->isDeclaration())
return false; // No main found, must be a library...
-
+
// Preserve main, internalize all else.
ExternalNames.insert(MainFunc->getName());
}
-
+
bool Changed = false;
-
+
// Mark all functions not in the api as internal.
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isDeclaration() && // Function must be defined here
@@ -131,11 +131,11 @@ bool InternalizePass::runOnModule(Module &M) {
++NumFunctions;
DOUT << "Internalizing func " << I->getName() << "\n";
}
-
+
// Never internalize the llvm.used symbol. It is used to implement
// attribute((used)).
ExternalNames.insert("llvm.used");
-
+
// Never internalize anchors used by the machine module info, else the info
// won't find them. (see MachineModuleInfo.)
ExternalNames.insert("llvm.dbg.compile_units");
@@ -145,7 +145,7 @@ bool InternalizePass::runOnModule(Module &M) {
ExternalNames.insert("llvm.global_dtors");
ExternalNames.insert("llvm.noinline");
ExternalNames.insert("llvm.global.annotations");
-
+
// Mark all global variables with initializers that are not in the api as
// internal as well.
for (Module::global_iterator I = M.global_begin(), E = M.global_end();
@@ -157,7 +157,7 @@ bool InternalizePass::runOnModule(Module &M) {
++NumGlobals;
DOUT << "Internalized gvar " << I->getName() << "\n";
}
-
+
return Changed;
}