mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-29 22:52:18 +00:00
Remove a temporary variable and just construct a unique_ptr directly using make_unique.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ddf2ec4d4b
commit
275458e7da
@ -304,14 +304,12 @@ public:
|
||||
setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
|
||||
|
||||
// Remember the initial assembler options. The user can not modify these.
|
||||
MipsAssemblerOptions *TmpAOPtr =
|
||||
new MipsAssemblerOptions(getAvailableFeatures());
|
||||
AssemblerOptions.push_back(std::unique_ptr<MipsAssemblerOptions>(TmpAOPtr));
|
||||
AssemblerOptions.push_back(
|
||||
make_unique<MipsAssemblerOptions>(getAvailableFeatures()));
|
||||
|
||||
// Create an assembler options environment for the user to modify.
|
||||
TmpAOPtr = new MipsAssemblerOptions(getAvailableFeatures());
|
||||
AssemblerOptions.push_back(std::unique_ptr<MipsAssemblerOptions>(TmpAOPtr));
|
||||
TmpAOPtr = nullptr;
|
||||
AssemblerOptions.push_back(
|
||||
make_unique<MipsAssemblerOptions>(getAvailableFeatures()));
|
||||
|
||||
getTargetStreamer().updateABIInfo(*this);
|
||||
|
||||
@ -2700,9 +2698,8 @@ bool MipsAsmParser::parseSetPushDirective() {
|
||||
return reportParseError("unexpected token, expected end of statement");
|
||||
|
||||
// Create a copy of the current assembler options environment and push it.
|
||||
MipsAssemblerOptions *TmpAOPtr =
|
||||
new MipsAssemblerOptions(AssemblerOptions.back().get());
|
||||
AssemblerOptions.push_back(std::unique_ptr<MipsAssemblerOptions>(TmpAOPtr));
|
||||
AssemblerOptions.push_back(
|
||||
make_unique<MipsAssemblerOptions>(AssemblerOptions.back().get()));
|
||||
|
||||
getTargetStreamer().emitDirectiveSetPush();
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user