Added default ctor to Selector.

REASON: Without a default ctor we cannot do "new Selector[xxx]" and similar
operations with ADTs that need to default constructor selectors.

llvm-svn: 50534
This commit is contained in:
Ted Kremenek 2008-05-01 18:32:59 +00:00
parent f0b0f2edfe
commit 88f8ebdf76
1 changed files with 4 additions and 0 deletions

View File

@ -222,6 +222,10 @@ class Selector {
public:
friend class SelectorTable; // only the SelectorTable can create these.
/// The default ctor should only be used when creating data structures that
/// will contain selectors.
Selector() : InfoPtr(0) {}
IdentifierInfo *getAsIdentifierInfo() const {
if (getIdentifierInfoFlag())
return reinterpret_cast<IdentifierInfo *>(InfoPtr & ~ArgFlags);