diff options
author | Mike Stump <mrs@apple.com> | 2009-07-28 02:25:19 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-07-28 02:25:19 +0000 |
commit | 782fa308a765aeac2acb39c4e697c937ec21185b (patch) | |
tree | 3bd6c43f32e0d1c70fb66aed8a15c0332c86b1d1 /lib/Frontend/PCHReader.cpp | |
parent | 0cfeb63f532973777f6fe75d3468c3acad4adfe3 (diff) |
Make longjmp a real builtin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReader.cpp')
-rw-r--r-- | lib/Frontend/PCHReader.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index f21fc62522..8665705f68 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -1540,6 +1540,28 @@ void PCHReader::InitializeContext(ASTContext &Ctx) { Context->setFILEDecl(Tag->getDecl()); } } + if (unsigned Jmp_buf = SpecialTypes[pch::SPECIAL_TYPE_jmp_buf]) { + QualType Jmp_bufType = GetType(Jmp_buf); + assert(!Jmp_bufType.isNull() && "jmp_bug type is NULL"); + if (const TypedefType *Typedef = Jmp_bufType->getAsTypedefType()) + Context->setjmp_bufDecl(Typedef->getDecl()); + else { + const TagType *Tag = Jmp_bufType->getAsTagType(); + assert(Tag && "Invalid jmp_bug type in PCH file"); + Context->setjmp_bufDecl(Tag->getDecl()); + } + } + if (unsigned Sigjmp_buf = SpecialTypes[pch::SPECIAL_TYPE_sigjmp_buf]) { + QualType Sigjmp_bufType = GetType(Sigjmp_buf); + assert(!Sigjmp_bufType.isNull() && "sigjmp_buf type is NULL"); + if (const TypedefType *Typedef = Sigjmp_bufType->getAsTypedefType()) + Context->setsigjmp_bufDecl(Typedef->getDecl()); + else { + const TagType *Tag = Sigjmp_bufType->getAsTagType(); + assert(Tag && "Invalid sigjmp_buf type in PCH file"); + Context->setsigjmp_bufDecl(Tag->getDecl()); + } + } } /// \brief Retrieve the name of the original source file name |