[cfe-commits] r136318 - /cfe/trunk/lib/Serialization/ASTReader.cpp
Douglas Gregor
dgregor at apple.com
Wed Jul 27 17:57:24 PDT 2011
Author: dgregor
Date: Wed Jul 27 19:57:24 2011
New Revision: 136318
URL: http://llvm.org/viewvc/llvm-project?rev=136318&view=rev
Log:
Don't set Sema's StdNamespace or StdBadAlloc if they've already been set
Modified:
cfe/trunk/lib/Serialization/ASTReader.cpp
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=136318&r1=136317&r2=136318&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Wed Jul 27 19:57:24 2011
@@ -4346,8 +4346,10 @@
// They will be lazily deserialized when needed.
if (!SemaDeclRefs.empty()) {
assert(SemaDeclRefs.size() == 2 && "More decl refs than expected!");
- SemaObj->StdNamespace = SemaDeclRefs[0];
- SemaObj->StdBadAlloc = SemaDeclRefs[1];
+ if (!SemaObj->StdNamespace)
+ SemaObj->StdNamespace = SemaDeclRefs[0];
+ if (!SemaObj->StdBadAlloc)
+ SemaObj->StdBadAlloc = SemaDeclRefs[1];
}
for (Module *F = &ModuleMgr.getPrimaryModule(); F; F = F->NextInSource) {
More information about the cfe-commits
mailing list