blob: 344c4eb18dc1673b976a9299f0d8b5ec48557472 [file] [log] [blame]
Reid Spencer5f016e22007-07-11 17:01:13 +00001//===--- IdentifierTable.cpp - Hash table for identifier lookup -----------===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner0bc735f2007-12-29 19:59:25 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Reid Spencer5f016e22007-07-11 17:01:13 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the IdentifierInfo, IdentifierVisitor, and
11// IdentifierTable interfaces.
12//
13//===----------------------------------------------------------------------===//
14
Chris Lattnerc7229c32007-10-07 08:58:51 +000015#include "clang/Basic/IdentifierTable.h"
Reid Spencer5f016e22007-07-11 17:01:13 +000016#include "clang/Basic/LangOptions.h"
Steve Naroff29238a02007-10-05 18:42:47 +000017#include "llvm/ADT/FoldingSet.h"
Chris Lattner85994262007-10-05 20:15:24 +000018#include "llvm/ADT/DenseMap.h"
Chris Lattner3daed522009-03-02 22:20:04 +000019#include <cstdio>
Ted Kremenekc637e6b2007-10-23 22:18:37 +000020
Reid Spencer5f016e22007-07-11 17:01:13 +000021using namespace clang;
22
23//===----------------------------------------------------------------------===//
24// IdentifierInfo Implementation
25//===----------------------------------------------------------------------===//
26
Ted Kremenekea9c26b2009-01-20 23:28:34 +000027IdentifierInfo::IdentifierInfo() {
Reid Spencer5f016e22007-07-11 17:01:13 +000028 TokenID = tok::identifier;
Douglas Gregor5142af32008-11-06 16:32:23 +000029 ObjCOrBuiltinID = 0;
Chris Lattner4365a7e2007-10-07 07:09:52 +000030 HasMacro = false;
Reid Spencer5f016e22007-07-11 17:01:13 +000031 IsExtension = false;
32 IsPoisoned = false;
Reid Spencer5f016e22007-07-11 17:01:13 +000033 IsCPPOperatorKeyword = false;
Chris Lattner6a170eb2009-01-21 07:43:11 +000034 NeedsHandleIdentifier = false;
Reid Spencer5f016e22007-07-11 17:01:13 +000035 FETokenInfo = 0;
Ted Kremenekea9c26b2009-01-20 23:28:34 +000036 Entry = 0;
Reid Spencer5f016e22007-07-11 17:01:13 +000037}
38
Reid Spencer5f016e22007-07-11 17:01:13 +000039//===----------------------------------------------------------------------===//
40// IdentifierTable Implementation
41//===----------------------------------------------------------------------===//
42
Ted Kremenek72b1b152009-01-15 18:47:46 +000043IdentifierInfoLookup::~IdentifierInfoLookup() {}
44
45IdentifierTable::IdentifierTable(const LangOptions &LangOpts,
46 IdentifierInfoLookup* externalLookup)
47 : HashTable(8192), // Start with space for 8K identifiers.
48 ExternalLookup(externalLookup) {
Reid Spencer5f016e22007-07-11 17:01:13 +000049
50 // Populate the identifier table with info about keywords for the current
51 // language.
52 AddKeywords(LangOpts);
53}
54
55//===----------------------------------------------------------------------===//
56// Language Keyword Implementation
57//===----------------------------------------------------------------------===//
58
59/// AddKeyword - This method is used to associate a token ID with specific
60/// identifiers because they are language keywords. This causes the lexer to
61/// automatically map matching identifiers to specialized token codes.
62///
Chris Lattnerd4b80f12007-07-16 04:18:29 +000063/// The C90/C99/CPP/CPP0x flags are set to 0 if the token should be
64/// enabled in the specified langauge, set to 1 if it is an extension
65/// in the specified language, and set to 2 if disabled in the
66/// specified language.
Reid Spencer5f016e22007-07-11 17:01:13 +000067static void AddKeyword(const char *Keyword, unsigned KWLen,
68 tok::TokenKind TokenCode,
Nate Begeman8aebcb72007-11-15 07:30:50 +000069 int C90, int C99, int CXX, int CXX0x, int BoolSupport,
Reid Spencer5f016e22007-07-11 17:01:13 +000070 const LangOptions &LangOpts, IdentifierTable &Table) {
Nate Begeman8aebcb72007-11-15 07:30:50 +000071 int Flags = 0;
72 if (BoolSupport != 0) {
Douglas Gregor7de3d792008-09-11 12:06:59 +000073 Flags = LangOpts.CPlusPlus? 0 : LangOpts.Boolean ? BoolSupport : 2;
Nate Begeman8aebcb72007-11-15 07:30:50 +000074 } else if (LangOpts.CPlusPlus) {
75 Flags = LangOpts.CPlusPlus0x ? CXX0x : CXX;
76 } else if (LangOpts.C99) {
77 Flags = C99;
78 } else {
79 Flags = C90;
80 }
Reid Spencer5f016e22007-07-11 17:01:13 +000081
82 // Don't add this keyword if disabled in this language or if an extension
83 // and extensions are disabled.
84 if (Flags + LangOpts.NoExtensions >= 2) return;
85
86 IdentifierInfo &Info = Table.get(Keyword, Keyword+KWLen);
87 Info.setTokenID(TokenCode);
88 Info.setIsExtensionToken(Flags == 1);
89}
90
91static void AddAlias(const char *Keyword, unsigned KWLen,
Chris Lattner49581f42008-02-19 06:46:10 +000092 tok::TokenKind AliaseeID,
Reid Spencer5f016e22007-07-11 17:01:13 +000093 const char *AliaseeKeyword, unsigned AliaseeKWLen,
94 const LangOptions &LangOpts, IdentifierTable &Table) {
95 IdentifierInfo &AliasInfo = Table.get(Keyword, Keyword+KWLen);
96 IdentifierInfo &AliaseeInfo = Table.get(AliaseeKeyword,
97 AliaseeKeyword+AliaseeKWLen);
Chris Lattner49581f42008-02-19 06:46:10 +000098 AliasInfo.setTokenID(AliaseeID);
Reid Spencer5f016e22007-07-11 17:01:13 +000099 AliasInfo.setIsExtensionToken(AliaseeInfo.isExtensionToken());
100}
101
Reid Spencer5f016e22007-07-11 17:01:13 +0000102/// AddCXXOperatorKeyword - Register a C++ operator keyword alternative
103/// representations.
104static void AddCXXOperatorKeyword(const char *Keyword, unsigned KWLen,
105 tok::TokenKind TokenCode,
106 IdentifierTable &Table) {
107 IdentifierInfo &Info = Table.get(Keyword, Keyword + KWLen);
108 Info.setTokenID(TokenCode);
Ted Kremenekc637e6b2007-10-23 22:18:37 +0000109 Info.setIsCPlusPlusOperatorKeyword();
Reid Spencer5f016e22007-07-11 17:01:13 +0000110}
111
112/// AddObjCKeyword - Register an Objective-C @keyword like "class" "selector" or
113/// "property".
114static void AddObjCKeyword(tok::ObjCKeywordKind ObjCID,
115 const char *Name, unsigned NameLen,
116 IdentifierTable &Table) {
117 Table.get(Name, Name+NameLen).setObjCKeywordID(ObjCID);
118}
119
120/// AddKeywords - Add all keywords to the symbol table.
121///
122void IdentifierTable::AddKeywords(const LangOptions &LangOpts) {
123 enum {
124 C90Shift = 0,
125 EXTC90 = 1 << C90Shift,
126 NOTC90 = 2 << C90Shift,
127 C99Shift = 2,
128 EXTC99 = 1 << C99Shift,
129 NOTC99 = 2 << C99Shift,
130 CPPShift = 4,
131 EXTCPP = 1 << CPPShift,
132 NOTCPP = 2 << CPPShift,
Chris Lattnerd4b80f12007-07-16 04:18:29 +0000133 CPP0xShift = 6,
134 EXTCPP0x = 1 << CPP0xShift,
135 NOTCPP0x = 2 << CPP0xShift,
Nate Begeman8aebcb72007-11-15 07:30:50 +0000136 BoolShift = 8,
137 BOOLSUPPORT = 1 << BoolShift,
Reid Spencer5f016e22007-07-11 17:01:13 +0000138 Mask = 3
139 };
140
141 // Add keywords and tokens for the current language.
142#define KEYWORD(NAME, FLAGS) \
143 AddKeyword(#NAME, strlen(#NAME), tok::kw_ ## NAME, \
144 ((FLAGS) >> C90Shift) & Mask, \
145 ((FLAGS) >> C99Shift) & Mask, \
Chris Lattnerd4b80f12007-07-16 04:18:29 +0000146 ((FLAGS) >> CPPShift) & Mask, \
Nate Begeman8aebcb72007-11-15 07:30:50 +0000147 ((FLAGS) >> CPP0xShift) & Mask, \
148 ((FLAGS) >> BoolShift) & Mask, LangOpts, *this);
Reid Spencer5f016e22007-07-11 17:01:13 +0000149#define ALIAS(NAME, TOK) \
Chris Lattner49581f42008-02-19 06:46:10 +0000150 AddAlias(NAME, strlen(NAME), tok::kw_ ## TOK, #TOK, strlen(#TOK), \
151 LangOpts, *this);
Reid Spencer5f016e22007-07-11 17:01:13 +0000152#define CXX_KEYWORD_OPERATOR(NAME, ALIAS) \
153 if (LangOpts.CXXOperatorNames) \
154 AddCXXOperatorKeyword(#NAME, strlen(#NAME), tok::ALIAS, *this);
155#define OBJC1_AT_KEYWORD(NAME) \
156 if (LangOpts.ObjC1) \
157 AddObjCKeyword(tok::objc_##NAME, #NAME, strlen(#NAME), *this);
158#define OBJC2_AT_KEYWORD(NAME) \
159 if (LangOpts.ObjC2) \
160 AddObjCKeyword(tok::objc_##NAME, #NAME, strlen(#NAME), *this);
161#include "clang/Basic/TokenKinds.def"
162}
163
Chris Lattner387b98d2007-10-07 07:52:34 +0000164tok::PPKeywordKind IdentifierInfo::getPPKeywordID() const {
165 // We use a perfect hash function here involving the length of the keyword,
166 // the first and third character. For preprocessor ID's there are no
167 // collisions (if there were, the switch below would complain about duplicate
168 // case values). Note that this depends on 'if' being null terminated.
169
170#define HASH(LEN, FIRST, THIRD) \
171 (LEN << 5) + (((FIRST-'a') + (THIRD-'a')) & 31)
172#define CASE(LEN, FIRST, THIRD, NAME) \
173 case HASH(LEN, FIRST, THIRD): \
174 return memcmp(Name, #NAME, LEN) ? tok::pp_not_keyword : tok::pp_ ## NAME
175
176 unsigned Len = getLength();
Chris Lattnera31f0302007-10-10 20:59:57 +0000177 if (Len < 2) return tok::pp_not_keyword;
Chris Lattner387b98d2007-10-07 07:52:34 +0000178 const char *Name = getName();
179 switch (HASH(Len, Name[0], Name[2])) {
180 default: return tok::pp_not_keyword;
181 CASE( 2, 'i', '\0', if);
182 CASE( 4, 'e', 'i', elif);
183 CASE( 4, 'e', 's', else);
184 CASE( 4, 'l', 'n', line);
185 CASE( 4, 's', 'c', sccs);
186 CASE( 5, 'e', 'd', endif);
187 CASE( 5, 'e', 'r', error);
188 CASE( 5, 'i', 'e', ident);
189 CASE( 5, 'i', 'd', ifdef);
190 CASE( 5, 'u', 'd', undef);
191
192 CASE( 6, 'a', 's', assert);
193 CASE( 6, 'd', 'f', define);
194 CASE( 6, 'i', 'n', ifndef);
195 CASE( 6, 'i', 'p', import);
196 CASE( 6, 'p', 'a', pragma);
197
198 CASE( 7, 'd', 'f', defined);
199 CASE( 7, 'i', 'c', include);
200 CASE( 7, 'w', 'r', warning);
201
202 CASE( 8, 'u', 'a', unassert);
203 CASE(12, 'i', 'c', include_next);
Chris Lattnerb8e240e2009-04-08 18:24:34 +0000204
205 CASE(16, '_', 'i', __include_macros);
Chris Lattner387b98d2007-10-07 07:52:34 +0000206#undef CASE
207#undef HASH
208 }
209}
Reid Spencer5f016e22007-07-11 17:01:13 +0000210
211//===----------------------------------------------------------------------===//
212// Stats Implementation
213//===----------------------------------------------------------------------===//
214
215/// PrintStats - Print statistics about how well the identifier table is doing
216/// at hashing identifiers.
217void IdentifierTable::PrintStats() const {
218 unsigned NumBuckets = HashTable.getNumBuckets();
219 unsigned NumIdentifiers = HashTable.getNumItems();
220 unsigned NumEmptyBuckets = NumBuckets-NumIdentifiers;
221 unsigned AverageIdentifierSize = 0;
222 unsigned MaxIdentifierLength = 0;
223
224 // TODO: Figure out maximum times an identifier had to probe for -stats.
Ted Kremenekea9c26b2009-01-20 23:28:34 +0000225 for (llvm::StringMap<IdentifierInfo*, llvm::BumpPtrAllocator>::const_iterator
Reid Spencer5f016e22007-07-11 17:01:13 +0000226 I = HashTable.begin(), E = HashTable.end(); I != E; ++I) {
227 unsigned IdLen = I->getKeyLength();
228 AverageIdentifierSize += IdLen;
229 if (MaxIdentifierLength < IdLen)
230 MaxIdentifierLength = IdLen;
231 }
232
233 fprintf(stderr, "\n*** Identifier Table Stats:\n");
234 fprintf(stderr, "# Identifiers: %d\n", NumIdentifiers);
235 fprintf(stderr, "# Empty Buckets: %d\n", NumEmptyBuckets);
236 fprintf(stderr, "Hash density (#identifiers per bucket): %f\n",
237 NumIdentifiers/(double)NumBuckets);
238 fprintf(stderr, "Ave identifier length: %f\n",
239 (AverageIdentifierSize/(double)NumIdentifiers));
240 fprintf(stderr, "Max identifier length: %d\n", MaxIdentifierLength);
241
242 // Compute statistics about the memory allocated for identifiers.
243 HashTable.getAllocator().PrintStats();
244}
Steve Naroff68d331a2007-09-27 14:38:14 +0000245
Steve Naroff29238a02007-10-05 18:42:47 +0000246//===----------------------------------------------------------------------===//
247// SelectorTable Implementation
248//===----------------------------------------------------------------------===//
249
Chris Lattner85994262007-10-05 20:15:24 +0000250unsigned llvm::DenseMapInfo<clang::Selector>::getHashValue(clang::Selector S) {
251 return DenseMapInfo<void*>::getHashValue(S.getAsOpaquePtr());
252}
253
Douglas Gregor2e1cd422008-11-17 14:58:09 +0000254namespace clang {
Steve Naroff29238a02007-10-05 18:42:47 +0000255/// MultiKeywordSelector - One of these variable length records is kept for each
256/// selector containing more than one keyword. We use a folding set
257/// to unique aggregate names (keyword selectors in ObjC parlance). Access to
258/// this class is provided strictly through Selector.
Douglas Gregor2e1cd422008-11-17 14:58:09 +0000259class MultiKeywordSelector
260 : public DeclarationNameExtra, public llvm::FoldingSetNode {
Douglas Gregor2e1cd422008-11-17 14:58:09 +0000261 MultiKeywordSelector(unsigned nKeys) {
262 ExtraKindOrNumArgs = NUM_EXTRA_KINDS + nKeys;
263 }
Steve Naroff29238a02007-10-05 18:42:47 +0000264public:
Steve Naroff29238a02007-10-05 18:42:47 +0000265 // Constructor for keyword selectors.
266 MultiKeywordSelector(unsigned nKeys, IdentifierInfo **IIV) {
267 assert((nKeys > 1) && "not a multi-keyword selector");
Douglas Gregor2e1cd422008-11-17 14:58:09 +0000268 ExtraKindOrNumArgs = NUM_EXTRA_KINDS + nKeys;
Ted Kremenekbdbb2852007-11-30 22:46:56 +0000269
Steve Naroff29238a02007-10-05 18:42:47 +0000270 // Fill in the trailing keyword array.
271 IdentifierInfo **KeyInfo = reinterpret_cast<IdentifierInfo **>(this+1);
272 for (unsigned i = 0; i != nKeys; ++i)
273 KeyInfo[i] = IIV[i];
Ted Kremenekbdbb2852007-11-30 22:46:56 +0000274 }
275
Chris Lattnerf836e3f2007-10-07 01:33:16 +0000276 // getName - Derive the full selector name and return it.
277 std::string getName() const;
278
Douglas Gregor2e1cd422008-11-17 14:58:09 +0000279 unsigned getNumArgs() const { return ExtraKindOrNumArgs - NUM_EXTRA_KINDS; }
Steve Naroff29238a02007-10-05 18:42:47 +0000280
281 typedef IdentifierInfo *const *keyword_iterator;
282 keyword_iterator keyword_begin() const {
283 return reinterpret_cast<keyword_iterator>(this+1);
284 }
285 keyword_iterator keyword_end() const {
Douglas Gregor2e1cd422008-11-17 14:58:09 +0000286 return keyword_begin()+getNumArgs();
Steve Naroff29238a02007-10-05 18:42:47 +0000287 }
Chris Lattnerf836e3f2007-10-07 01:33:16 +0000288 IdentifierInfo *getIdentifierInfoForSlot(unsigned i) const {
Douglas Gregor2e1cd422008-11-17 14:58:09 +0000289 assert(i < getNumArgs() && "getIdentifierInfoForSlot(): illegal index");
Steve Naroff29238a02007-10-05 18:42:47 +0000290 return keyword_begin()[i];
291 }
292 static void Profile(llvm::FoldingSetNodeID &ID,
293 keyword_iterator ArgTys, unsigned NumArgs) {
294 ID.AddInteger(NumArgs);
Chris Lattnerf836e3f2007-10-07 01:33:16 +0000295 for (unsigned i = 0; i != NumArgs; ++i)
296 ID.AddPointer(ArgTys[i]);
Steve Naroff29238a02007-10-05 18:42:47 +0000297 }
298 void Profile(llvm::FoldingSetNodeID &ID) {
Douglas Gregor2e1cd422008-11-17 14:58:09 +0000299 Profile(ID, keyword_begin(), getNumArgs());
Steve Naroff29238a02007-10-05 18:42:47 +0000300 }
301};
Chris Lattner85994262007-10-05 20:15:24 +0000302} // end namespace clang.
Steve Naroff29238a02007-10-05 18:42:47 +0000303
304unsigned Selector::getNumArgs() const {
305 unsigned IIF = getIdentifierInfoFlag();
306 if (IIF == ZeroArg)
307 return 0;
308 if (IIF == OneArg)
309 return 1;
310 // We point to a MultiKeywordSelector (pointer doesn't contain any flags).
311 MultiKeywordSelector *SI = reinterpret_cast<MultiKeywordSelector *>(InfoPtr);
312 return SI->getNumArgs();
313}
314
Chris Lattnerf836e3f2007-10-07 01:33:16 +0000315IdentifierInfo *Selector::getIdentifierInfoForSlot(unsigned argIndex) const {
316 if (IdentifierInfo *II = getAsIdentifierInfo()) {
317 assert(argIndex == 0 && "illegal keyword index");
Steve Naroff29238a02007-10-05 18:42:47 +0000318 return II;
319 }
320 // We point to a MultiKeywordSelector (pointer doesn't contain any flags).
321 MultiKeywordSelector *SI = reinterpret_cast<MultiKeywordSelector *>(InfoPtr);
322 return SI->getIdentifierInfoForSlot(argIndex);
323}
324
Chris Lattnerf836e3f2007-10-07 01:33:16 +0000325std::string MultiKeywordSelector::getName() const {
326 std::string Result;
327 unsigned Length = 0;
328 for (keyword_iterator I = keyword_begin(), E = keyword_end(); I != E; ++I) {
329 if (*I)
330 Length += (*I)->getLength();
331 ++Length; // :
Steve Naroff29238a02007-10-05 18:42:47 +0000332 }
Chris Lattnerf836e3f2007-10-07 01:33:16 +0000333
334 Result.reserve(Length);
335
336 for (keyword_iterator I = keyword_begin(), E = keyword_end(); I != E; ++I) {
337 if (*I)
338 Result.insert(Result.end(), (*I)->getName(),
339 (*I)->getName()+(*I)->getLength());
340 Result.push_back(':');
341 }
342
343 return Result;
Steve Naroff29238a02007-10-05 18:42:47 +0000344}
345
Chris Lattner077bf5e2008-11-24 03:33:13 +0000346std::string Selector::getAsString() const {
Ted Kremenekf5ed3962009-03-06 23:36:28 +0000347 if (InfoPtr & ArgFlags) {
348 IdentifierInfo *II = getAsIdentifierInfo();
Chris Lattnerf836e3f2007-10-07 01:33:16 +0000349
Ted Kremenek150ec292009-03-07 01:22:02 +0000350 // If the number of arguments is 0 then II is guaranteed to not be null.
Ted Kremenekf5ed3962009-03-06 23:36:28 +0000351 if (getNumArgs() == 0)
Ted Kremenek150ec292009-03-07 01:22:02 +0000352 return II->getName();
Ted Kremenekf5ed3962009-03-06 23:36:28 +0000353
354 std::string Res = II ? II->getName() : "";
Chris Lattnerf836e3f2007-10-07 01:33:16 +0000355 Res += ":";
356 return Res;
Steve Naroff29238a02007-10-05 18:42:47 +0000357 }
Chris Lattnerf836e3f2007-10-07 01:33:16 +0000358
359 // We have a multiple keyword selector (no embedded flags).
360 return reinterpret_cast<MultiKeywordSelector *>(InfoPtr)->getName();
Steve Naroff29238a02007-10-05 18:42:47 +0000361}
362
363
Chris Lattner5f7d2282009-03-04 05:35:38 +0000364namespace {
365 struct SelectorTableImpl {
366 llvm::FoldingSet<MultiKeywordSelector> Table;
367 llvm::BumpPtrAllocator Allocator;
368 };
369} // end anonymous namespace.
370
371static SelectorTableImpl &getSelectorTableImpl(void *P) {
372 return *static_cast<SelectorTableImpl*>(P);
373}
374
375
Chris Lattnerff384912007-10-07 02:00:24 +0000376Selector SelectorTable::getSelector(unsigned nKeys, IdentifierInfo **IIV) {
377 if (nKeys < 2)
378 return Selector(IIV[0], nKeys);
Chris Lattnerf836e3f2007-10-07 01:33:16 +0000379
Chris Lattner5f7d2282009-03-04 05:35:38 +0000380 SelectorTableImpl &SelTabImpl = getSelectorTableImpl(Impl);
Steve Naroff29238a02007-10-05 18:42:47 +0000381
382 // Unique selector, to guarantee there is one per name.
383 llvm::FoldingSetNodeID ID;
384 MultiKeywordSelector::Profile(ID, IIV, nKeys);
385
386 void *InsertPos = 0;
Chris Lattner5f7d2282009-03-04 05:35:38 +0000387 if (MultiKeywordSelector *SI =
388 SelTabImpl.Table.FindNodeOrInsertPos(ID, InsertPos))
Steve Naroff29238a02007-10-05 18:42:47 +0000389 return Selector(SI);
Chris Lattnerf836e3f2007-10-07 01:33:16 +0000390
Steve Naroff29238a02007-10-05 18:42:47 +0000391 // MultiKeywordSelector objects are not allocated with new because they have a
392 // variable size array (for parameter types) at the end of them.
Chris Lattner5f7d2282009-03-04 05:35:38 +0000393 unsigned Size = sizeof(MultiKeywordSelector) + nKeys*sizeof(IdentifierInfo *);
394 MultiKeywordSelector *SI =
395 (MultiKeywordSelector*)SelTabImpl.Allocator.Allocate(Size,
396 llvm::alignof<MultiKeywordSelector>());
Steve Naroff29238a02007-10-05 18:42:47 +0000397 new (SI) MultiKeywordSelector(nKeys, IIV);
Chris Lattner5f7d2282009-03-04 05:35:38 +0000398 SelTabImpl.Table.InsertNode(SI, InsertPos);
Steve Naroff29238a02007-10-05 18:42:47 +0000399 return Selector(SI);
400}
401
Steve Naroff29238a02007-10-05 18:42:47 +0000402SelectorTable::SelectorTable() {
Chris Lattner5f7d2282009-03-04 05:35:38 +0000403 Impl = new SelectorTableImpl();
Steve Naroff29238a02007-10-05 18:42:47 +0000404}
405
406SelectorTable::~SelectorTable() {
Chris Lattner5f7d2282009-03-04 05:35:38 +0000407 delete &getSelectorTableImpl(Impl);
Steve Naroff29238a02007-10-05 18:42:47 +0000408}
409