summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-10-19 22:15:20 +0000
committerTed Kremenek <kremenek@apple.com>2010-10-19 22:15:20 +0000
commitc8456f8c593a0db19bc6827adefa3f3dbf2e9b2d (patch)
tree95662576ab546f4a52b6877876416b75250df466 /clang/lib/Lex/Preprocessor.cpp
parentc1fb15ea8f9be66ca034d44857c62248fe00c607 (diff)
downloadbcm5719-llvm-c8456f8c593a0db19bc6827adefa3f3dbf2e9b2d.tar.gz
bcm5719-llvm-c8456f8c593a0db19bc6827adefa3f3dbf2e9b2d.zip
Really^2 fix <rdar://problem/8361834>, this time without crashing.
Now MICache is a linked list (per the FIXME), where we tradeoff between MacroInfo objects being in MICache and MIChainHead. MacroInfo objects in the MICache chain are already "Destroy()'ed", so they can be reused. When inserting into MICache, we need to remove them from the regular linked list so that they aren't destroyed more than once. llvm-svn: 116869
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index a0782aa8681..1be22df6b1c 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -56,7 +56,8 @@ Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts,
SourceMgr(SM), HeaderInfo(Headers), ExternalSource(0),
Identifiers(opts, IILookup), BuiltinInfo(Target), CodeComplete(0),
CodeCompletionFile(0), SkipMainFilePreamble(0, true), CurPPLexer(0),
- CurDirLookup(0), Callbacks(0), MacroArgCache(0), Record(0), MIChainHead(0) {
+ CurDirLookup(0), Callbacks(0), MacroArgCache(0), Record(0), MIChainHead(0),
+ MICache(0) {
ScratchBuf = new ScratchBuffer(SourceMgr);
CounterValue = 0; // __COUNTER__ starts at 0.
OwnsHeaderSearch = OwnsHeaders;
OpenPOWER on IntegriCloud