summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-20 23:59:00 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-20 23:59:00 +0000
commit1df9ce8da582a9a945f73829d84689e66689d7e0 (patch)
tree1eedfed7aeef2e41c10e104c8e69b711bf3ae66b /include
parentf4a2635c25ccb1709c0ff2854974d2fa80555290 (diff)
downloadllvm-1df9ce8da582a9a945f73829d84689e66689d7e0.tar.gz
llvm-1df9ce8da582a9a945f73829d84689e66689d7e0.tar.bz2
llvm-1df9ce8da582a9a945f73829d84689e66689d7e0.tar.xz
Protect the ArgList dtor
It could even be made non-virtual if it weren't for bad compiler warnings. This demonstrates that ArgList objects aren't destroyed polymorphically and possibly that they aren't even used polymorphically. If that's the case, it might be possible to refactor the two ArgList types more separately and simplify the Arg ownership model. *continues experimenting* git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Option/ArgList.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/Option/ArgList.h b/include/llvm/Option/ArgList.h
index 25248f444d..ab40a1a0d4 100644
--- a/include/llvm/Option/ArgList.h
+++ b/include/llvm/Option/ArgList.h
@@ -106,10 +106,14 @@ private:
arglist_type Args;
protected:
- ArgList();
+ // Default ctor provided explicitly as it is not provided implicitly due to
+ // the presence of the (deleted) copy ctor above.
+ ArgList() { }
+ // Virtual to provide a vtable anchor and because -Wnon-virtua-dtor warns, not
+ // because this type is ever actually destroyed polymorphically.
+ virtual ~ArgList();
public:
- virtual ~ArgList();
/// @name Arg Access
/// @{