summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-12-12 07:52:06 +0000
committerCraig Topper <craig.topper@gmail.com>2014-12-12 07:52:06 +0000
commit0d114c5450b91f96d2193cd3dec3957b2967ab3f (patch)
tree9bc8da7a3fa77b8237280a0b1acc4fa73451b60d
parent7bea3cf1eb76b8e4c53753e5dc665c13438a1c71 (diff)
downloadbcm5719-llvm-0d114c5450b91f96d2193cd3dec3957b2967ab3f.tar.gz
bcm5719-llvm-0d114c5450b91f96d2193cd3dec3957b2967ab3f.zip
Remove an unnecessary reference variable that pointed to a unique_ptr variable. Just use the unique_ptr variable directly.
llvm-svn: 224104
-rw-r--r--llvm/tools/llc/llc.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 9014378fcca..35f965b2a30 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -271,10 +271,10 @@ static int compileModule(char **argv, LLVMContext &Context) {
Options.MCOptions.MCUseDwarfDirectory = EnableDwarfDirectory;
Options.MCOptions.AsmVerbose = AsmVerbose;
- std::unique_ptr<TargetMachine> target(
+ std::unique_ptr<TargetMachine> Target(
TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr,
Options, RelocModel, CMModel, OLvl));
- assert(target.get() && "Could not allocate target machine!");
+ assert(Target && "Could not allocate target machine!");
// If we don't have a module then just exit now. We do this down
// here since the CPU/Feature help is underneath the target machine
@@ -283,7 +283,6 @@ static int compileModule(char **argv, LLVMContext &Context) {
return 0;
assert(M && "Should have exited if we didn't have a module!");
- TargetMachine &Target = *target.get();
if (GenerateSoftFloatCalls)
FloatABIForCalls = FloatABI::Soft;
@@ -303,7 +302,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
PM.add(TLI);
// Add the target data from the target machine, if it exists, or the module.
- if (const DataLayout *DL = Target.getSubtargetImpl()->getDataLayout())
+ if (const DataLayout *DL = Target->getSubtargetImpl()->getDataLayout())
M->setDataLayout(DL);
PM.add(new DataLayoutPass());
@@ -336,8 +335,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
}
// Ask the target to add backend passes as necessary.
- if (Target.addPassesToEmitFile(PM, FOS, FileType, NoVerify,
- StartAfterID, StopAfterID)) {
+ if (Target->addPassesToEmitFile(PM, FOS, FileType, NoVerify,
+ StartAfterID, StopAfterID)) {
errs() << argv[0] << ": target does not support generation of this"
<< " file type!\n";
return 1;
OpenPOWER on IntegriCloud