diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-04-20 23:59:00 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-04-20 23:59:00 +0000 |
commit | 1df9ce8da582a9a945f73829d84689e66689d7e0 (patch) | |
tree | 1eedfed7aeef2e41c10e104c8e69b711bf3ae66b /include | |
parent | f4a2635c25ccb1709c0ff2854974d2fa80555290 (diff) | |
download | llvm-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.h | 8 |
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 /// @{ |