blob: b12a59fc48380409b62a2112e3c1fc569e336370 [file] [log] [blame]
Ted Kremenek85888962008-10-21 00:54:44 +00001//===--- CacheTokens.cpp - Caching of lexer tokens for PCH support --------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This provides a possible implementation of PCH support for Clang that is
11// based on caching lexed tokens and identifiers.
12//
13//===----------------------------------------------------------------------===//
14
15#include "clang.h"
16#include "clang/Basic/FileManager.h"
17#include "clang/Basic/SourceManager.h"
18#include "clang/Basic/IdentifierTable.h"
19#include "clang/Basic/Diagnostic.h"
20#include "clang/Lex/Lexer.h"
21#include "clang/Lex/Preprocessor.h"
22#include "llvm/Support/MemoryBuffer.h"
23#include "llvm/Support/raw_ostream.h"
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +000024#include "llvm/System/Path.h"
Ted Kremenek85888962008-10-21 00:54:44 +000025
26using namespace clang;
27
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +000028typedef uint32_t Offset;
29
Ted Kremenekfb645b62008-12-11 23:36:38 +000030typedef llvm::DenseMap<const FileEntry*,std::pair<Offset,Offset> > PCHMap;
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +000031typedef llvm::DenseMap<const IdentifierInfo*,uint32_t> IDMap;
Ted Kremenek85888962008-10-21 00:54:44 +000032
Ted Kremenek8f174e12008-12-23 02:52:12 +000033static void Emit8(llvm::raw_ostream& Out, uint32_t V) {
34 Out << (unsigned char)(V);
35}
36
Ted Kremenek85888962008-10-21 00:54:44 +000037static void Emit32(llvm::raw_ostream& Out, uint32_t V) {
38 Out << (unsigned char)(V);
39 Out << (unsigned char)(V >> 8);
40 Out << (unsigned char)(V >> 16);
41 Out << (unsigned char)(V >> 24);
42}
43
Ted Kremenek8f174e12008-12-23 02:52:12 +000044static void Emit16(llvm::raw_ostream& Out, uint32_t V) {
Ted Kremenek85888962008-10-21 00:54:44 +000045 Out << (unsigned char)(V);
Ted Kremenek8f174e12008-12-23 02:52:12 +000046 Out << (unsigned char)(V >> 8);
47 assert((V >> 16) == 0);
Ted Kremenek85888962008-10-21 00:54:44 +000048}
49
Ted Kremenek18d9afb2008-12-23 18:41:34 +000050static void Emit24(llvm::raw_ostream& Out, uint32_t V) {
51 Out << (unsigned char)(V);
52 Out << (unsigned char)(V >> 8);
53 Out << (unsigned char)(V >> 16);
54 assert((V >> 24) == 0);
55}
56
Ted Kremenek85888962008-10-21 00:54:44 +000057static void EmitBuf(llvm::raw_ostream& Out, const char* I, const char* E) {
58 for ( ; I != E ; ++I) Out << *I;
59}
60
61static uint32_t ResolveID(IDMap& IM, uint32_t& idx, const IdentifierInfo* II) {
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +000062
63 // Null IdentifierInfo's map to the persistent ID 0.
64 if (!II)
65 return 0;
66
Ted Kremenek85888962008-10-21 00:54:44 +000067 IDMap::iterator I = IM.find(II);
68
69 if (I == IM.end()) {
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +000070 IM[II] = ++idx; // Pre-increment since '0' is reserved for NULL.
71 return idx;
Ted Kremenek85888962008-10-21 00:54:44 +000072 }
73
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +000074 return I->second; // We've already added 1.
Ted Kremenek85888962008-10-21 00:54:44 +000075}
76
77static void EmitToken(llvm::raw_ostream& Out, const Token& T,
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +000078 const SourceManager& SMgr,
Ted Kremenek85888962008-10-21 00:54:44 +000079 uint32_t& idcount, IDMap& IM) {
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +000080
Ted Kremenek85888962008-10-21 00:54:44 +000081 Emit8(Out, T.getKind());
82 Emit8(Out, T.getFlags());
Ted Kremenek18d9afb2008-12-23 18:41:34 +000083 Emit24(Out, ResolveID(IM, idcount, T.getIdentifierInfo()));
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +000084 Emit32(Out, SMgr.getFullFilePos(T.getLocation()));
Ted Kremenek8f174e12008-12-23 02:52:12 +000085 Emit16(Out, T.getLength());
Ted Kremenek85888962008-10-21 00:54:44 +000086}
87
Ted Kremenekfa59aad2008-11-26 23:58:26 +000088struct IDData {
89 const IdentifierInfo* II;
90 uint32_t FileOffset;
91 const IdentifierTable::const_iterator::value_type* Str;
92};
Ted Kremeneka3d764c2008-11-26 03:36:26 +000093
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +000094static std::pair<Offset,Offset>
Ted Kremenekfa59aad2008-11-26 23:58:26 +000095EmitIdentifierTable(llvm::raw_fd_ostream& Out, uint32_t max,
96 const IdentifierTable& T, const IDMap& IM) {
97
98 // Build an inverse map from persistent IDs -> IdentifierInfo*.
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +000099 typedef std::vector<IDData> InverseIDMap;
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000100 InverseIDMap IIDMap;
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000101 IIDMap.resize(max);
Ted Kremenek85888962008-10-21 00:54:44 +0000102
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000103 // Generate mapping from persistent IDs -> IdentifierInfo*.
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000104 for (IDMap::const_iterator I=IM.begin(), E=IM.end(); I!=E; ++I) {
105 // Decrement by 1 because we are using a vector for the lookup and
106 // 0 is reserved for NULL.
107 assert(I->second > 0);
108 assert(I->second-1 < IIDMap.size());
109 IIDMap[I->second-1].II = I->first;
110 }
Ted Kremenek85888962008-10-21 00:54:44 +0000111
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000112 // Get the string data associated with the IdentifierInfo.
113 for (IdentifierTable::const_iterator I=T.begin(), E=T.end(); I!=E; ++I) {
114 IDMap::const_iterator IDI = IM.find(&(I->getValue()));
115 if (IDI == IM.end()) continue;
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000116 IIDMap[IDI->second-1].Str = &(*I);
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000117 }
118
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000119 Offset DataOff = Out.tell();
Ted Kremenek6183e482008-12-03 01:16:39 +0000120
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000121 for (InverseIDMap::iterator I=IIDMap.begin(), E=IIDMap.end(); I!=E; ++I) {
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000122 // Record the location for this data.
123 I->FileOffset = Out.tell();
124 // Write out the keyword.
125 unsigned len = I->Str->getKeyLength();
Ted Kremenek85888962008-10-21 00:54:44 +0000126 Emit32(Out, len);
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000127 const char* buf = I->Str->getKeyData();
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000128 EmitBuf(Out, buf, buf+len);
Ted Kremenek85888962008-10-21 00:54:44 +0000129 }
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000130
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000131 // Now emit the table mapping from persistent IDs to PTH file offsets.
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000132 Offset IDOff = Out.tell();
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000133
Ted Kremenek6183e482008-12-03 01:16:39 +0000134 // Emit the number of identifiers.
135 Emit32(Out, max);
136
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000137 for (InverseIDMap::iterator I=IIDMap.begin(), E=IIDMap.end(); I!=E; ++I)
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000138 Emit32(Out, I->FileOffset);
139
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000140 return std::make_pair(DataOff, IDOff);
Ted Kremenek85888962008-10-21 00:54:44 +0000141}
142
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000143Offset EmitFileTable(llvm::raw_fd_ostream& Out, SourceManager& SM, PCHMap& PM) {
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000144
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000145 Offset off = (Offset) Out.tell();
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000146
147 // Output the size of the table.
148 Emit32(Out, PM.size());
149
150 for (PCHMap::iterator I=PM.begin(), E=PM.end(); I!=E; ++I) {
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000151 const FileEntry* FE = I->first;
Ted Kremenek8dffd9b2008-12-04 22:36:44 +0000152 const char* Name = FE->getName();
153 unsigned size = strlen(Name);
154 Emit32(Out, size);
155 EmitBuf(Out, Name, Name+size);
Ted Kremenekfb645b62008-12-11 23:36:38 +0000156 Emit32(Out, I->second.first);
157 Emit32(Out, I->second.second);
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000158 }
159
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000160 return off;
161}
162
Ted Kremenekfb645b62008-12-11 23:36:38 +0000163static std::pair<Offset,Offset>
164LexTokens(llvm::raw_fd_ostream& Out, Lexer& L, Preprocessor& PP,
165 uint32_t& idcount, IDMap& IM) {
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000166
167 // Record the location within the token file.
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000168 Offset off = (Offset) Out.tell();
169 SourceManager& SMgr = PP.getSourceManager();
Ted Kremenekfb645b62008-12-11 23:36:38 +0000170
171 // Keep track of matching '#if' ... '#endif'.
172 typedef std::vector<std::pair<Offset, unsigned> > PPCondTable;
173 PPCondTable PPCond;
Ted Kremenekdad7b342008-12-12 18:31:09 +0000174 std::vector<unsigned> PPStartCond;
Ted Kremeneke5680f32008-12-23 01:30:52 +0000175 bool ParsingPreprocessorDirective = false;
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000176
177 Token Tok;
178
179 do {
180 L.LexFromRawLexer(Tok);
181
Ted Kremeneke5680f32008-12-23 01:30:52 +0000182 if ((Tok.isAtStartOfLine() || Tok.is(tok::eof)) &&
183 ParsingPreprocessorDirective) {
184 // Insert an eom token into the token cache. It has the same
185 // position as the next token that is not on the same line as the
186 // preprocessor directive. Observe that we continue processing
187 // 'Tok' when we exit this branch.
188 Token Tmp = Tok;
189 Tmp.setKind(tok::eom);
190 Tmp.clearFlag(Token::StartOfLine);
191 Tmp.setIdentifierInfo(0);
192 EmitToken(Out, Tmp, SMgr, idcount, IM);
193 ParsingPreprocessorDirective = false;
194 }
195
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000196 if (Tok.is(tok::identifier)) {
197 Tok.setIdentifierInfo(PP.LookUpIdentifierInfo(Tok));
Ted Kremeneke5680f32008-12-23 01:30:52 +0000198 continue;
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000199 }
Ted Kremeneke5680f32008-12-23 01:30:52 +0000200
201 if (Tok.is(tok::hash) && Tok.isAtStartOfLine()) {
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000202 // Special processing for #include. Store the '#' token and lex
203 // the next token.
Ted Kremeneke5680f32008-12-23 01:30:52 +0000204 assert(!ParsingPreprocessorDirective);
Ted Kremenekfb645b62008-12-11 23:36:38 +0000205 Offset HashOff = (Offset) Out.tell();
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000206 EmitToken(Out, Tok, SMgr, idcount, IM);
Ted Kremenekdad7b342008-12-12 18:31:09 +0000207
208 // Get the next token.
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000209 L.LexFromRawLexer(Tok);
Ted Kremeneke5680f32008-12-23 01:30:52 +0000210
211 assert(!Tok.isAtStartOfLine());
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000212
213 // Did we see 'include'/'import'/'include_next'?
214 if (!Tok.is(tok::identifier))
215 continue;
216
217 IdentifierInfo* II = PP.LookUpIdentifierInfo(Tok);
218 Tok.setIdentifierInfo(II);
219 tok::PPKeywordKind K = II->getPPKeywordID();
220
Ted Kremeneke5680f32008-12-23 01:30:52 +0000221 assert(K != tok::pp_not_keyword);
222 ParsingPreprocessorDirective = true;
223
224 switch (K) {
225 default:
226 break;
227 case tok::pp_include:
228 case tok::pp_import:
229 case tok::pp_include_next: {
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000230 // Save the 'include' token.
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000231 EmitToken(Out, Tok, SMgr, idcount, IM);
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000232 // Lex the next token as an include string.
233 L.setParsingPreprocessorDirective(true);
234 L.LexIncludeFilename(Tok);
235 L.setParsingPreprocessorDirective(false);
Ted Kremeneke5680f32008-12-23 01:30:52 +0000236 assert(!Tok.isAtStartOfLine());
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000237 if (Tok.is(tok::identifier))
238 Tok.setIdentifierInfo(PP.LookUpIdentifierInfo(Tok));
Ted Kremeneke5680f32008-12-23 01:30:52 +0000239
240 break;
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000241 }
Ted Kremeneke5680f32008-12-23 01:30:52 +0000242 case tok::pp_if:
243 case tok::pp_ifdef:
244 case tok::pp_ifndef: {
Ted Kremenekfb645b62008-12-11 23:36:38 +0000245 // Ad an entry for '#if' and friends. We initially set the target index
246 // to 0. This will get backpatched when we hit #endif.
247 PPStartCond.push_back(PPCond.size());
Ted Kremenekdad7b342008-12-12 18:31:09 +0000248 PPCond.push_back(std::make_pair(HashOff, 0U));
Ted Kremeneke5680f32008-12-23 01:30:52 +0000249 break;
Ted Kremenekfb645b62008-12-11 23:36:38 +0000250 }
Ted Kremeneke5680f32008-12-23 01:30:52 +0000251 case tok::pp_endif: {
Ted Kremenekfb645b62008-12-11 23:36:38 +0000252 // Add an entry for '#endif'. We set the target table index to itself.
Ted Kremenekdad7b342008-12-12 18:31:09 +0000253 // This will later be set to zero when emitting to the PTH file. We
254 // use 0 for uninitialized indices because that is easier to debug.
Ted Kremenekfb645b62008-12-11 23:36:38 +0000255 unsigned index = PPCond.size();
Ted Kremenekfb645b62008-12-11 23:36:38 +0000256 // Backpatch the opening '#if' entry.
Ted Kremenekdad7b342008-12-12 18:31:09 +0000257 assert(!PPStartCond.empty());
258 assert(PPCond.size() > PPStartCond.back());
Ted Kremenekfb645b62008-12-11 23:36:38 +0000259 assert(PPCond[PPStartCond.back()].second == 0);
260 PPCond[PPStartCond.back()].second = index;
261 PPStartCond.pop_back();
Ted Kremenekdad7b342008-12-12 18:31:09 +0000262 // Add the new entry to PPCond.
263 PPCond.push_back(std::make_pair(HashOff, index));
Ted Kremeneke5680f32008-12-23 01:30:52 +0000264 break;
Ted Kremenekfb645b62008-12-11 23:36:38 +0000265 }
Ted Kremeneke5680f32008-12-23 01:30:52 +0000266 case tok::pp_elif:
267 case tok::pp_else: {
268 // Add an entry for #elif or #else.
Ted Kremenekdad7b342008-12-12 18:31:09 +0000269 // This serves as both a closing and opening of a conditional block.
270 // This means that its entry will get backpatched later.
Ted Kremenekfb645b62008-12-11 23:36:38 +0000271 unsigned index = PPCond.size();
Ted Kremenekfb645b62008-12-11 23:36:38 +0000272 // Backpatch the previous '#if' entry.
Ted Kremenekdad7b342008-12-12 18:31:09 +0000273 assert(!PPStartCond.empty());
274 assert(PPCond.size() > PPStartCond.back());
Ted Kremenekfb645b62008-12-11 23:36:38 +0000275 assert(PPCond[PPStartCond.back()].second == 0);
276 PPCond[PPStartCond.back()].second = index;
277 PPStartCond.pop_back();
278 // Now add '#elif' as a new block opening.
Ted Kremenekdad7b342008-12-12 18:31:09 +0000279 PPCond.push_back(std::make_pair(HashOff, 0U));
280 PPStartCond.push_back(index);
Ted Kremeneke5680f32008-12-23 01:30:52 +0000281 break;
282 }
Ted Kremenekfb645b62008-12-11 23:36:38 +0000283 }
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000284 }
285 }
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000286 while (EmitToken(Out, Tok, SMgr, idcount, IM), Tok.isNot(tok::eof));
Ted Kremenekfb645b62008-12-11 23:36:38 +0000287
Ted Kremenekdad7b342008-12-12 18:31:09 +0000288 assert(PPStartCond.empty() && "Error: imblanced preprocessor conditionals.");
289
Ted Kremenekfb645b62008-12-11 23:36:38 +0000290 // Next write out PPCond.
291 Offset PPCondOff = (Offset) Out.tell();
Ted Kremenekdad7b342008-12-12 18:31:09 +0000292
293 // Write out the size of PPCond so that clients can identifer empty tables.
Ted Kremenekfb645b62008-12-11 23:36:38 +0000294 Emit32(Out, PPCond.size());
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000295
Ted Kremenekdad7b342008-12-12 18:31:09 +0000296 for (unsigned i = 0, e = PPCond.size(); i!=e; ++i) {
297 Emit32(Out, PPCond[i].first - off);
298 uint32_t x = PPCond[i].second;
299 assert(x != 0 && "PPCond entry not backpatched.");
300 // Emit zero for #endifs. This allows us to do checking when
301 // we read the PTH file back in.
302 Emit32(Out, x == i ? 0 : x);
Ted Kremenekfb645b62008-12-11 23:36:38 +0000303 }
304
305 return std::make_pair(off,PPCondOff);
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000306}
Ted Kremenek85888962008-10-21 00:54:44 +0000307
308void clang::CacheTokens(Preprocessor& PP, const std::string& OutFile) {
309 // Lex through the entire file. This will populate SourceManager with
310 // all of the header information.
311 Token Tok;
312 PP.EnterMainSourceFile();
313 do { PP.Lex(Tok); } while (Tok.isNot(tok::eof));
314
315 // Iterate over all the files in SourceManager. Create a lexer
316 // for each file and cache the tokens.
317 SourceManager& SM = PP.getSourceManager();
318 const LangOptions& LOpts = PP.getLangOptions();
319 llvm::raw_ostream& os = llvm::errs();
320
321 PCHMap PM;
322 IDMap IM;
Ted Kremenek85888962008-10-21 00:54:44 +0000323 uint32_t idcount = 0;
324
325 std::string ErrMsg;
Daniel Dunbar26fb2722008-11-13 05:09:21 +0000326 llvm::raw_fd_ostream Out(OutFile.c_str(), true, ErrMsg);
Ted Kremenek85888962008-10-21 00:54:44 +0000327
328 if (!ErrMsg.empty()) {
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000329 os << "PTH error: " << ErrMsg << "\n";
Ted Kremenek85888962008-10-21 00:54:44 +0000330 return;
331 }
332
333 for (SourceManager::fileid_iterator I=SM.fileid_begin(), E=SM.fileid_end();
334 I!=E; ++I) {
335
336 const SrcMgr::ContentCache* C = I.getFileIDInfo().getContentCache();
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000337 if (!C) continue;
Ted Kremenek85888962008-10-21 00:54:44 +0000338
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000339 const FileEntry* FE = C->Entry; // Does this entry correspond to a file?
340 if (!FE) continue;
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000341
342 // FIXME: Handle files with non-absolute paths.
343 llvm::sys::Path P(FE->getName());
344 if (!P.isAbsolute())
345 continue;
Ted Kremenek85888962008-10-21 00:54:44 +0000346
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000347 PCHMap::iterator PI = PM.find(FE); // Have we already processed this file?
348 if (PI != PM.end()) continue;
349
Chris Lattner1b230142009-01-06 04:47:20 +0000350 const llvm::MemoryBuffer* B = C->getBuffer();
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000351 if (!B) continue;
352
Ted Kremenek85888962008-10-21 00:54:44 +0000353 Lexer L(SourceLocation::getFileLoc(I.getFileID(), 0), LOpts,
354 B->getBufferStart(), B->getBufferEnd(), B);
Ted Kremenekfb645b62008-12-11 23:36:38 +0000355
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000356 PM[FE] = LexTokens(Out, L, PP, idcount, IM);
Daniel Dunbar31309ab2008-11-26 02:18:33 +0000357 }
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000358
359 // Write out the identifier table.
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000360 std::pair<Offset,Offset> IdTableOff =
Ted Kremenekfa59aad2008-11-26 23:58:26 +0000361 EmitIdentifierTable(Out, idcount, PP.getIdentifierTable(), IM);
Ted Kremenek85888962008-10-21 00:54:44 +0000362
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000363 // Write out the file table.
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000364 Offset FileTableOff = EmitFileTable(Out, SM, PM);
Ted Kremeneka3d764c2008-11-26 03:36:26 +0000365
366 // Finally, write out the offset table at the end.
Ted Kremenekfc7e2ea2008-12-02 19:44:08 +0000367 Emit32(Out, IdTableOff.first);
368 Emit32(Out, IdTableOff.second);
369 Emit32(Out, FileTableOff);
Ted Kremenek85888962008-10-21 00:54:44 +0000370}