diff options
author | Anders Carlsson <andersca@mac.com> | 2008-02-08 00:33:21 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-02-08 00:33:21 +0000 |
commit | dfab6cb59a703f2ce4d58371652ce879f4c85a09 (patch) | |
tree | 08c333c7a2c28c6541b8d0328d13420ed8e90686 /AST/DeclSerialization.cpp | |
parent | 3f9424f3206b834b5dd0e7c403348651ab6fafbb (diff) |
Put back the top-level asm code; all tests pass now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46868 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'AST/DeclSerialization.cpp')
-rw-r--r-- | AST/DeclSerialization.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/AST/DeclSerialization.cpp b/AST/DeclSerialization.cpp index 146ebbacbe..cb91846a02 100644 --- a/AST/DeclSerialization.cpp +++ b/AST/DeclSerialization.cpp @@ -67,6 +67,9 @@ Decl* Decl::Create(Deserializer& D) { case Typedef: return TypedefDecl::CreateImpl(D); + + case FileScopeAsm: + return FileScopeAsmDecl::CreateImpl(D); } } @@ -438,3 +441,23 @@ void LinkageSpecDecl::ReadInRec(Deserializer& D) { Language = static_cast<LanguageIDs>(D.ReadInt()); D.ReadPtr(this->D); } + +//===----------------------------------------------------------------------===// +// FileScopeAsm Serialization. +//===----------------------------------------------------------------------===// + +void FileScopeAsmDecl::EmitImpl(llvm::Serializer& S) const +{ + Decl::EmitInRec(S); + S.EmitOwnedPtr(AsmString); +} + +FileScopeAsmDecl* FileScopeAsmDecl::CreateImpl(Deserializer& D) { + FileScopeAsmDecl* decl = new FileScopeAsmDecl(SourceLocation(), 0); + + decl->Decl::ReadInRec(D); + decl->AsmString = cast<StringLiteral>(D.ReadOwnedPtr<Expr>()); +// D.ReadOwnedPtr(D.ReadOwnedPtr<StringLiteral>())<#T * * Ptr#>, <#bool AutoRegister#>)(decl->AsmString); + + return decl; +} |