mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
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
This commit is contained in:
parent
f4a2635c25
commit
1df9ce8da5
@ -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
|
||||
/// @{
|
||||
|
@ -33,11 +33,6 @@ void arg_iterator::SkipToNextArg() {
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
ArgList::ArgList() {
|
||||
}
|
||||
|
||||
ArgList::~ArgList() {
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user