зеркало из https://github.com/microsoft/clang-1.git
When reading in the DeclCtx during deserialization, register the DeclCtx of the
ScopedDecl with the backpatcher, and *not* a local variable on the stack. The value of DeclCtx gets filled in *later* by the backpatcher. This fixes: http://llvm.org/bugs/show_bug.cgi?id=2308 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50976 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
769c9cfc6e
Коммит
9f3e89ad02
|
@ -116,9 +116,10 @@ void ScopedDecl::EmitInRec(Serializer& S) const {
|
|||
void ScopedDecl::ReadInRec(Deserializer& D, ASTContext& C) {
|
||||
NamedDecl::ReadInRec(D, C);
|
||||
D.ReadPtr(Next); // From ScopedDecl.
|
||||
Decl *TmpD;
|
||||
D.ReadPtr(TmpD); // From ScopedDecl.
|
||||
DeclCtx = cast_or_null<DeclContext>(TmpD);
|
||||
|
||||
DeclCtx = 0; // Allow back-patching. Observe that we register
|
||||
D.ReadPtr(DeclCtx); // the variable of the *object* for back-patching.
|
||||
// It's actual value will get filled in later.
|
||||
}
|
||||
|
||||
//===------------------------------------------------------------===//
|
||||
|
|
Загрузка…
Ссылка в новой задаче