aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/VTableBuilder.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-04-14 14:13:43 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-04-14 14:13:43 +0000
commit8fb9fb66d415ee40447277f649ecdb12b4964385 (patch)
treeeb62575aab181e73e1a81150398f6b7eaac6908f /lib/AST/VTableBuilder.cpp
parenta2189d7548f44cce1a7831903d2fc861d75e49bb (diff)
Replace manual delete[] with OwningArrayPtr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/VTableBuilder.cpp')
-rw-r--r--lib/AST/VTableBuilder.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/AST/VTableBuilder.cpp b/lib/AST/VTableBuilder.cpp
index 8683d1f3cb..107d9fb78c 100644
--- a/lib/AST/VTableBuilder.cpp
+++ b/lib/AST/VTableBuilder.cpp
@@ -2157,14 +2157,12 @@ VTableLayout::VTableLayout(uint64_t NumVTableComponents,
VTableThunks(new VTableThunkTy[NumVTableThunks]),
AddressPoints(AddressPoints) {
std::copy(VTableComponents, VTableComponents+NumVTableComponents,
- this->VTableComponents);
- std::copy(VTableThunks, VTableThunks+NumVTableThunks, this->VTableThunks);
+ this->VTableComponents.get());
+ std::copy(VTableThunks, VTableThunks+NumVTableThunks,
+ this->VTableThunks.get());
}
-VTableLayout::~VTableLayout() {
- delete[] VTableComponents;
- delete[] VTableThunks;
-}
+VTableLayout::~VTableLayout() { }
VTableContext::~VTableContext() {
llvm::DeleteContainerSeconds(VTableLayouts);