summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-03-04 01:41:01 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-03-04 01:41:01 +0000
commit0afee8517645922c8c177d57d8225c43c234ff64 (patch)
tree66d7689c2381abb22246e5ba5c960deb1bd78559 /llvm/lib/AsmParser/LLParser.h
parentb9cc659efec95a612d005263817d1047aae89e40 (diff)
downloadbcm5719-llvm-0afee8517645922c8c177d57d8225c43c234ff64.tar.gz
bcm5719-llvm-0afee8517645922c8c177d57d8225c43c234ff64.zip
unique_ptrify ValID::ConstantStructElts
llvm-svn: 231200
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
-rw-r--r--llvm/lib/AsmParser/LLParser.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h
index 5e92e570e72..3675d958323 100644
--- a/llvm/lib/AsmParser/LLParser.h
+++ b/llvm/lib/AsmParser/LLParser.h
@@ -62,13 +62,9 @@ namespace llvm {
APSInt APSIntVal;
APFloat APFloatVal;
Constant *ConstantVal;
- Constant **ConstantStructElts;
+ std::unique_ptr<Constant*[]> ConstantStructElts;
ValID() : Kind(t_LocalID), APFloatVal(0.0) {}
- ~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