-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243816 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f5cf675376
commit
8bf187c91f
|
@ -460,6 +460,20 @@ struct MatchableInfo {
|
|||
TheDef->getValueAsBit("UseInstAsmMatchConverter")) {
|
||||
}
|
||||
|
||||
// Could remove this and the dtor if PointerUnion supported unique_ptr
|
||||
// elements with a dynamic failure/assertion (like the one below) in the case
|
||||
// where it was copied while being in an owning state.
|
||||
MatchableInfo(const MatchableInfo &RHS)
|
||||
: AsmVariantID(RHS.AsmVariantID), AsmString(RHS.AsmString),
|
||||
TheDef(RHS.TheDef), DefRec(RHS.DefRec), ResOperands(RHS.ResOperands),
|
||||
Mnemonic(RHS.Mnemonic), AsmOperands(RHS.AsmOperands),
|
||||
RequiredFeatures(RHS.RequiredFeatures),
|
||||
ConversionFnKind(RHS.ConversionFnKind),
|
||||
HasDeprecation(RHS.HasDeprecation),
|
||||
UseInstAsmMatchConverter(RHS.UseInstAsmMatchConverter) {
|
||||
assert(!DefRec.is<const CodeGenInstAlias *>());
|
||||
}
|
||||
|
||||
~MatchableInfo() {
|
||||
delete DefRec.dyn_cast<const CodeGenInstAlias*>();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue