diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-09 21:04:32 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-09 21:04:32 +0000 |
commit | 14b6ba77710d6431794d65c7d58c6f29c3dc956e (patch) | |
tree | 3b7c789d69dd7808da2d135caae3200ebecb639a /lib/Serialization/ASTWriter.cpp | |
parent | eb4c45b383b4a8f69d23e4b9cfb6dd3e6f8ff641 (diff) |
AST, Sema, Serialization: keep track of cudaConfigureCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125216 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index fdd5800e9c..a5af03cfb0 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -2545,6 +2545,11 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls, AddDeclRef(SemaRef.getStdBadAlloc(), SemaDeclRefs); } + RecordData CUDASpecialDeclRefs; + if (Context.getcudaConfigureCallDecl()) { + AddDeclRef(Context.getcudaConfigureCallDecl(), CUDASpecialDeclRefs); + } + // Write the remaining AST contents. RecordData Record; Stream.EnterSubblock(AST_BLOCK_ID, 5); @@ -2659,6 +2664,10 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls, if (!SemaDeclRefs.empty()) Stream.EmitRecord(SEMA_DECL_REFS, SemaDeclRefs); + // Write the record containing CUDA-specific declaration references. + if (!CUDASpecialDeclRefs.empty()) + Stream.EmitRecord(CUDA_SPECIAL_DECL_REFS, CUDASpecialDeclRefs); + // Some simple statistics Record.clear(); Record.push_back(NumStatements); |