aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/TranslationUnit.cpp
diff options
context:
space:
mode:
authorSam Bishop <sam@bishop.dhs.org>2008-04-07 21:55:54 +0000
committerSam Bishop <sam@bishop.dhs.org>2008-04-07 21:55:54 +0000
commite2563ca02a519c2ad6d64dfed87d6e86c5d3c072 (patch)
treec998a62e0d5bd13e96a0bdd6188d1d3c6ae97132 /lib/AST/TranslationUnit.cpp
parentd77bc2834269593282e06806a74d14e244bc26a4 (diff)
Pass the ASTContext object around when deserializing Decl and Stmt objects, so
they can be created using the same allocator as in the "from source code" case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/TranslationUnit.cpp')
-rw-r--r--lib/AST/TranslationUnit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/TranslationUnit.cpp b/lib/AST/TranslationUnit.cpp
index 3ad134a292..b3a2e68f60 100644
--- a/lib/AST/TranslationUnit.cpp
+++ b/lib/AST/TranslationUnit.cpp
@@ -221,7 +221,7 @@ TranslationUnit* TranslationUnit::Create(llvm::Deserializer& Dezr,
llvm::Deserializer::Location DeclBlockLoc = Dezr.getCurrentBlockLocation();
while (!Dezr.FinishedBlock(DeclBlockLoc))
- TU->AddTopLevelDecl(Dezr.ReadOwnedPtr<Decl>());
+ TU->AddTopLevelDecl(Dezr.ReadOwnedPtr<Decl>(*TU->Context));
return TU;
}