diff options
author | Devang Patel <dpatel@apple.com> | 2006-08-14 23:37:18 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2006-08-14 23:37:18 +0000 |
commit | 2198f9cec47b4683377d4f4080acb14dd94fad65 (patch) | |
tree | c474b5947f73c3ca4c5ab015903f4b3b869cd027 /tools/lto | |
parent | 2fa6d3b1fcadbde90eaee0e8e89aebd81630b662 (diff) | |
download | external_llvm-2198f9cec47b4683377d4f4080acb14dd94fad65.zip external_llvm-2198f9cec47b4683377d4f4080acb14dd94fad65.tar.gz external_llvm-2198f9cec47b4683377d4f4080acb14dd94fad65.tar.bz2 |
untabify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r-- | tools/lto/lto.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp index a274d98..162bac9 100644 --- a/tools/lto/lto.cpp +++ b/tools/lto/lto.cpp @@ -86,7 +86,7 @@ getLTOLinkageType(GlobalValue *v) // Find exeternal symbols referenced by VALUE. This is a recursive function. static void findExternalRefs(Value *value, std::set<std::string> &references, - Mangler &mangler) { + Mangler &mangler) { if (GlobalValue *gv = dyn_cast<GlobalValue>(value)) { LTOLinkageTypes lt = getLTOLinkageType(gv); @@ -105,8 +105,8 @@ findExternalRefs(Value *value, std::set<std::string> &references, /// Return LTO_READ_SUCCESS if there is no error. enum LTOStatus LinkTimeOptimizer::readLLVMObjectFile(const std::string &InputFilename, - NameToSymbolMap &symbols, - std::set<std::string> &references) + NameToSymbolMap &symbols, + std::set<std::string> &references) { Module *m = ParseBytecodeFile(InputFilename); if (!m) @@ -123,9 +123,9 @@ LinkTimeOptimizer::readLLVMObjectFile(const std::string &InputFilename, LTOLinkageTypes lt = getLTOLinkageType(f); if (!f->isExternal() && lt != LTOInternalLinkage - && strncmp (f->getName().c_str(), "llvm.", 5)) { + && strncmp (f->getName().c_str(), "llvm.", 5)) { LLVMSymbol *newSymbol = new LLVMSymbol(lt, f, f->getName(), - mangler.getValueName(f)); + mangler.getValueName(f)); symbols[newSymbol->getMangledName()] = newSymbol; allSymbols[newSymbol->getMangledName()] = newSymbol; } @@ -133,24 +133,24 @@ LinkTimeOptimizer::readLLVMObjectFile(const std::string &InputFilename, // Collect external symbols referenced by this function. for (Function::iterator b = f->begin(), fe = f->end(); b != fe; ++b) for (BasicBlock::iterator i = b->begin(), be = b->end(); - i != be; ++i) - for (unsigned count = 0, total = i->getNumOperands(); - count != total; ++count) - findExternalRefs(i->getOperand(count), references, mangler); + i != be; ++i) + for (unsigned count = 0, total = i->getNumOperands(); + count != total; ++count) + findExternalRefs(i->getOperand(count), references, mangler); } for (Module::global_iterator v = m->global_begin(), e = m->global_end(); v != e; ++v) { LTOLinkageTypes lt = getLTOLinkageType(v); if (!v->isExternal() && lt != LTOInternalLinkage - && strncmp (v->getName().c_str(), "llvm.", 5)) { + && strncmp (v->getName().c_str(), "llvm.", 5)) { LLVMSymbol *newSymbol = new LLVMSymbol(lt, v, v->getName(), - mangler.getValueName(v)); + mangler.getValueName(v)); symbols[newSymbol->getMangledName()] = newSymbol; for (unsigned count = 0, total = v->getNumOperands(); - count != total; ++count) - findExternalRefs(v->getOperand(count), references, mangler); + count != total; ++count) + findExternalRefs(v->getOperand(count), references, mangler); } } @@ -163,7 +163,7 @@ LinkTimeOptimizer::readLLVMObjectFile(const std::string &InputFilename, /// based on information available to module M. No new target /// features are selected. static enum LTOStatus lto_optimize(Module *M, std::ostream &Out, - std::vector<const char *> &exportList) + std::vector<const char *> &exportList) { // Instantiate the pass manager to organize the passes. PassManager Passes; @@ -266,7 +266,7 @@ static enum LTOStatus lto_optimize(Module *M, std::ostream &Out, /// Return appropriate LTOStatus. enum LTOStatus LinkTimeOptimizer::optimizeModules(const std::string &OutputFilename, - std::vector<const char *> &exportList) + std::vector<const char *> &exportList) { if (modules.empty()) return LTO_NO_WORK; |