diff options
| author | Ted Kremenek <kremenek@apple.com> | 2008-05-01 18:32:59 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2008-05-01 18:32:59 +0000 |
| commit | 88f8ebdf76096337203a97344ad95d00dd5de1f6 (patch) | |
| tree | 8615f65c5d0e9470be3884576a68c47d0a8755f7 /clang | |
| parent | f0b0f2edfe10c829389f75d9927aa8ab22cc6abc (diff) | |
| download | bcm5719-llvm-88f8ebdf76096337203a97344ad95d00dd5de1f6.tar.gz bcm5719-llvm-88f8ebdf76096337203a97344ad95d00dd5de1f6.zip | |
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
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/include/clang/Basic/IdentifierTable.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/include/clang/Basic/IdentifierTable.h b/clang/include/clang/Basic/IdentifierTable.h index 7c9efc8bc40..024ff14456e 100644 --- a/clang/include/clang/Basic/IdentifierTable.h +++ b/clang/include/clang/Basic/IdentifierTable.h @@ -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); |

