summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LTO.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-07-15 03:06:42 +0000
committerRui Ueyama <ruiu@google.com>2016-07-15 03:06:42 +0000
commit601b07c7f50ebfe0a209e303565073418a6863e0 (patch)
tree6fd81e673ba8a0070e2283cb0fe66bd8ecc9dc35 /lld/ELF/LTO.cpp
parent112351dc38027f16b6cd5b55bfc41c585324ce01 (diff)
downloadbcm5719-llvm-601b07c7f50ebfe0a209e303565073418a6863e0.tar.gz
bcm5719-llvm-601b07c7f50ebfe0a209e303565073418a6863e0.zip
ELF: Remove member variables that are used only in one function.
Differential Revision: https://reviews.llvm.org/D22396 llvm-svn: 275526
Diffstat (limited to 'lld/ELF/LTO.cpp')
-rw-r--r--lld/ELF/LTO.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 64eb4cfd68f..8ba61262de8 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -144,8 +144,7 @@ static bool shouldInternalize(const SmallPtrSet<GlobalValue *, 8> &Used,
}
BitcodeCompiler::BitcodeCompiler()
- : Combined(new llvm::Module("ld-temp.o", Driver->Context)),
- Mover(*Combined) {}
+ : Combined(new llvm::Module("ld-temp.o", Driver->Context)) {}
static void undefine(Symbol *S) {
replaceBody<Undefined>(S, S->body()->getName(), STV_DEFAULT, S->body()->Type);
@@ -236,6 +235,7 @@ void BitcodeCompiler::add(BitcodeFile &F) {
Keep.push_back(GV);
}
+ IRMover Mover(*Combined);
if (Error E = Mover.move(Obj->takeModule(), Keep,
[](GlobalValue &, IRMover::ValueAdder) {})) {
handleAllErrors(std::move(E), [&](const llvm::ErrorInfoBase &EIB) {
@@ -286,13 +286,13 @@ std::vector<std::unique_ptr<InputFile>> BitcodeCompiler::runSplitCodegen(
// Merge all the bitcode files we have seen, codegen the result
// and return the resulting ObjectFile.
std::vector<std::unique_ptr<InputFile>> BitcodeCompiler::compile() {
- TheTriple = Combined->getTargetTriple();
for (const auto &Name : InternalizedSyms) {
GlobalValue *GV = Combined->getNamedValue(Name.first());
assert(GV);
internalize(*GV);
}
+ std::string TheTriple = Combined->getTargetTriple();
std::string Msg;
const Target *T = TargetRegistry::lookupTarget(TheTriple, Msg);
if (!T)
OpenPOWER on IntegriCloud