mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
Refactoring: raw pointer -> unique_ptr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218462 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -232,16 +232,14 @@ bool TGParser::AddSubMultiClass(MultiClass *CurMC,
|
|||||||
i != iend;
|
i != iend;
|
||||||
++i) {
|
++i) {
|
||||||
// Clone the def and add it to the current multiclass
|
// Clone the def and add it to the current multiclass
|
||||||
Record *NewDef = new Record(**i);
|
auto NewDef = make_unique<Record>(**i);
|
||||||
|
|
||||||
// Add all of the values in the superclass into the current def.
|
// Add all of the values in the superclass into the current def.
|
||||||
for (unsigned i = 0, e = MCVals.size(); i != e; ++i)
|
for (unsigned i = 0, e = MCVals.size(); i != e; ++i)
|
||||||
if (AddValue(NewDef, SubMultiClass.RefRange.Start, MCVals[i])) {
|
if (AddValue(NewDef.get(), SubMultiClass.RefRange.Start, MCVals[i]))
|
||||||
delete NewDef;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
CurMC->DefPrototypes.push_back(NewDef);
|
CurMC->DefPrototypes.push_back(NewDef.release());
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<Init *> &SMCTArgs = SMC->Rec.getTemplateArgs();
|
const std::vector<Init *> &SMCTArgs = SMC->Rec.getTemplateArgs();
|
||||||
|
Reference in New Issue
Block a user