diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-09-04 20:08:46 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-09-04 20:08:46 +0000 |
commit | 775079c227083be3fe22f6ae071d5b74a7ade745 (patch) | |
tree | e2b079d23e0ce5b330de6b18335650dcff1330df /tools/lto | |
parent | f94eea9e112a75d0d328f799dd889681094cee97 (diff) |
Rename some variables to match the style guide.
I am about to patch this code, and this makes the diff far more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 34 | ||||
-rw-r--r-- | tools/lto/LTOCodeGenerator.h | 6 |
2 files changed, 20 insertions, 20 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index e3e1ab3bf75..19e8c4c1491 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -300,18 +300,18 @@ bool LTOCodeGenerator::determineTarget(std::string &errMsg) { void LTOCodeGenerator:: applyRestriction(GlobalValue &GV, - std::vector<const char*> &mustPreserveList, - SmallPtrSet<GlobalValue*, 8> &asmUsed, - Mangler &mangler) { + std::vector<const char*> &MustPreserveList, + SmallPtrSet<GlobalValue*, 8> &AsmUsed, + Mangler &Mangler) { SmallString<64> Buffer; - mangler.getNameWithPrefix(Buffer, &GV, false); + Mangler.getNameWithPrefix(Buffer, &GV, false); if (GV.isDeclaration()) return; if (MustPreserveSymbols.count(Buffer)) - mustPreserveList.push_back(GV.getName().data()); + MustPreserveList.push_back(GV.getName().data()); if (AsmUndefinedRefs.count(Buffer)) - asmUsed.insert(&GV); + AsmUsed.insert(&GV); } static void findUsedValues(GlobalVariable *LLVMUsed, @@ -337,31 +337,31 @@ void LTOCodeGenerator::applyScopeRestrictions() { // mark which symbols can not be internalized MCContext MContext(TargetMach->getMCAsmInfo(), TargetMach->getRegisterInfo(), NULL); - Mangler mangler(MContext, TargetMach); - std::vector<const char*> mustPreserveList; - SmallPtrSet<GlobalValue*, 8> asmUsed; + Mangler Mangler(MContext, TargetMach); + std::vector<const char*> MustPreserveList; + SmallPtrSet<GlobalValue*, 8> AsmUsed; for (Module::iterator f = mergedModule->begin(), e = mergedModule->end(); f != e; ++f) - applyRestriction(*f, mustPreserveList, asmUsed, mangler); + applyRestriction(*f, MustPreserveList, AsmUsed, Mangler); for (Module::global_iterator v = mergedModule->global_begin(), e = mergedModule->global_end(); v != e; ++v) - applyRestriction(*v, mustPreserveList, asmUsed, mangler); + applyRestriction(*v, MustPreserveList, AsmUsed, Mangler); for (Module::alias_iterator a = mergedModule->alias_begin(), e = mergedModule->alias_end(); a != e; ++a) - applyRestriction(*a, mustPreserveList, asmUsed, mangler); + applyRestriction(*a, MustPreserveList, AsmUsed, Mangler); GlobalVariable *LLVMCompilerUsed = mergedModule->getGlobalVariable("llvm.compiler.used"); - findUsedValues(LLVMCompilerUsed, asmUsed); + findUsedValues(LLVMCompilerUsed, AsmUsed); if (LLVMCompilerUsed) LLVMCompilerUsed->eraseFromParent(); - if (!asmUsed.empty()) { + if (!AsmUsed.empty()) { llvm::Type *i8PTy = llvm::Type::getInt8PtrTy(Context); std::vector<Constant*> asmUsed2; - for (SmallPtrSet<GlobalValue*, 16>::const_iterator i = asmUsed.begin(), - e = asmUsed.end(); i !=e; ++i) { + for (SmallPtrSet<GlobalValue*, 16>::const_iterator i = AsmUsed.begin(), + e = AsmUsed.end(); i !=e; ++i) { GlobalValue *GV = *i; Constant *c = ConstantExpr::getBitCast(GV, i8PTy); asmUsed2.push_back(c); @@ -377,7 +377,7 @@ void LTOCodeGenerator::applyScopeRestrictions() { LLVMCompilerUsed->setSection("llvm.metadata"); } - passes.add(createInternalizePass(mustPreserveList)); + passes.add(createInternalizePass(MustPreserveList)); // apply scope restrictions passes.run(*mergedModule); diff --git a/tools/lto/LTOCodeGenerator.h b/tools/lto/LTOCodeGenerator.h index 8f551f86344..02633629f98 100644 --- a/tools/lto/LTOCodeGenerator.h +++ b/tools/lto/LTOCodeGenerator.h @@ -106,9 +106,9 @@ private: bool generateObjectFile(llvm::raw_ostream &out, std::string &errMsg); void applyScopeRestrictions(); void applyRestriction(llvm::GlobalValue &GV, - std::vector<const char*> &mustPreserveList, - llvm::SmallPtrSet<llvm::GlobalValue*, 8> &asmUsed, - llvm::Mangler &mangler); + std::vector<const char*> &MustPreserveList, + llvm::SmallPtrSet<llvm::GlobalValue*, 8> &AsmUsed, + llvm::Mangler &Mangler); bool determineTarget(std::string &errMsg); typedef llvm::StringMap<uint8_t> StringSet; |