]> granicus.if.org Git - clang/commit
Fix three related, wily issues with the recompilation of precompiled
authorDouglas Gregor <dgregor@apple.com>
Fri, 8 Oct 2010 04:03:57 +0000 (04:03 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 8 Oct 2010 04:03:57 +0000 (04:03 +0000)
commitaa3e6babe646329310388e5b7e0c9045e0018715
treef91471423791fa3e1c72abe48c654ced6bac0577
parenta6eb5f81d13bacac01faff70a947047725b4413f
Fix three related, wily issues with the recompilation of precompiled
preambles:

  - When we rebuild a precompiled preamble, make sure to disable
    skipping anything in the main file; we may have had leftover
    preamble-skipping values in the lexer, which leads to very empty
    preamble. This is a correctness issue.

  - When we rebuild a precompiled preamble, clear out any prior state
    in the Diagnostic object. Otherwise, we might think that there
    were errors when we were building the preamble itself, and
    therefore reject the resulting preamble. This is mainly a
    performance issue.

  - Don't remove old remappings when digging out the remapping for the
    main file. Having the old mappings around does not hurt in the
    common case (later remappings will just overwrite them), and is
    important when we fail to find a preamble: we don't want to have
    removed the remapping, because we'll need it later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116041 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Frontend/ASTUnit.cpp