summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
-rw-r--r--llvm/lib/AsmParser/LLParser.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h
index da3d02f9e5e..5e92e570e72 100644
--- a/llvm/lib/AsmParser/LLParser.h
+++ b/llvm/lib/AsmParser/LLParser.h
@@ -62,17 +62,13 @@ namespace llvm {
APSInt APSIntVal;
APFloat APFloatVal;
Constant *ConstantVal;
- std::unique_ptr<Constant*[]> ConstantStructElts;
+ Constant **ConstantStructElts;
ValID() : Kind(t_LocalID), APFloatVal(0.0) {}
- // Workaround for MSVC not synthesizing implicit move members.
- ValID(ValID &&RHS)
- : Kind(std::move(RHS.Kind)), Loc(std::move(RHS.Loc)),
- UIntVal(std::move(RHS.UIntVal)), StrVal(std::move(RHS.StrVal)),
- StrVal2(std::move(RHS.StrVal2)), APSIntVal(std::move(RHS.APSIntVal)),
- APFloatVal(std::move(RHS.APFloatVal)),
- ConstantVal(std::move(RHS.ConstantVal)),
- ConstantStructElts(std::move(RHS.ConstantStructElts)) {}
+ ~ValID() {
+ if (Kind == t_ConstantStruct || Kind == t_PackedConstantStruct)
+ delete [] ConstantStructElts;
+ }
bool operator<(const ValID &RHS) const {
if (Kind == t_LocalID || Kind == t_GlobalID)
OpenPOWER on IntegriCloud