When setting the globally-visible declarations for a particular
identifier, we may have a Sema object but no translation unit scope
(because parsing is finished). In this case, we still need to update
the IdResolver, which might still be used when writing a PCH
containing another PCH (without chaining). This bug manifested as a
failure with precompiled preambles.
Also, add a little environment-variable-sensitive logging for
libclang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114774
91177308-0d34-0410-b5e6-
96231b3b80d8