private:
/// All OMPTraitInfo objects live in this collection, one per
/// `pragma omp [begin] declare variant` directive.
- SmallVector<OMPTraitInfo *, 4> OMPTraitInfoVector;
+ SmallVector<std::unique_ptr<OMPTraitInfo>, 4> OMPTraitInfoVector;
};
/// Utility function for constructing a nullary selector.
for (APValue *Value : APValueCleanups)
Value->~APValue();
-
- // Destroy the OMPTraitInfo objects that life here.
- llvm::DeleteContainerPointers(OMPTraitInfoVector);
}
void ASTContext::setTraversalScope(const std::vector<Decl *> &TopLevelDecls) {
}
OMPTraitInfo &ASTContext::getNewOMPTraitInfo() {
- OMPTraitInfoVector.push_back(new OMPTraitInfo());
+ OMPTraitInfoVector.emplace_back(new OMPTraitInfo());
return *OMPTraitInfoVector.back();
}