summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-08-01 01:08:30 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-08-01 01:08:30 +0000
commit6e48a81309306c871a744c602bee74c9274f4b30 (patch)
tree198a20416e1bfce2e372ffc79fdf7eed5a97bc57 /llvm/utils
parentc86e7cfee997d9356ff7074f88e0111d97ded86d (diff)
downloadbcm5719-llvm-6e48a81309306c871a744c602bee74c9274f4b30.tar.gz
bcm5719-llvm-6e48a81309306c871a744c602bee74c9274f4b30.zip
-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
llvm-svn: 243816
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/TableGen/AsmMatcherEmitter.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index 0d7c5ffbea1..d4a0616584b 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -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*>();
}
OpenPOWER on IntegriCloud