mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 21:31:03 +00:00
Remove an unnecessary reference variable that pointed to a unique_ptr variable. Just use the unique_ptr variable directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224104 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2a4988e8fc
commit
e34c5782a8
@ -271,10 +271,10 @@ static int compileModule(char **argv, LLVMContext &Context) {
|
|||||||
Options.MCOptions.MCUseDwarfDirectory = EnableDwarfDirectory;
|
Options.MCOptions.MCUseDwarfDirectory = EnableDwarfDirectory;
|
||||||
Options.MCOptions.AsmVerbose = AsmVerbose;
|
Options.MCOptions.AsmVerbose = AsmVerbose;
|
||||||
|
|
||||||
std::unique_ptr<TargetMachine> target(
|
std::unique_ptr<TargetMachine> Target(
|
||||||
TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr,
|
TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr,
|
||||||
Options, RelocModel, CMModel, OLvl));
|
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
|
// 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
|
// here since the CPU/Feature help is underneath the target machine
|
||||||
@ -283,7 +283,6 @@ static int compileModule(char **argv, LLVMContext &Context) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
assert(M && "Should have exited if we didn't have a module!");
|
assert(M && "Should have exited if we didn't have a module!");
|
||||||
TargetMachine &Target = *target.get();
|
|
||||||
|
|
||||||
if (GenerateSoftFloatCalls)
|
if (GenerateSoftFloatCalls)
|
||||||
FloatABIForCalls = FloatABI::Soft;
|
FloatABIForCalls = FloatABI::Soft;
|
||||||
@ -303,7 +302,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
|
|||||||
PM.add(TLI);
|
PM.add(TLI);
|
||||||
|
|
||||||
// Add the target data from the target machine, if it exists, or the module.
|
// 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);
|
M->setDataLayout(DL);
|
||||||
PM.add(new DataLayoutPass());
|
PM.add(new DataLayoutPass());
|
||||||
|
|
||||||
@ -336,8 +335,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ask the target to add backend passes as necessary.
|
// Ask the target to add backend passes as necessary.
|
||||||
if (Target.addPassesToEmitFile(PM, FOS, FileType, NoVerify,
|
if (Target->addPassesToEmitFile(PM, FOS, FileType, NoVerify,
|
||||||
StartAfterID, StopAfterID)) {
|
StartAfterID, StopAfterID)) {
|
||||||
errs() << argv[0] << ": target does not support generation of this"
|
errs() << argv[0] << ": target does not support generation of this"
|
||||||
<< " file type!\n";
|
<< " file type!\n";
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user