diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-23 22:29:11 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-23 22:29:11 +0000 |
commit | 512b07780327f392833bded86f0277f13a61db44 (patch) | |
tree | ce316538a8ffdee5320c540a301e5d495154f444 /clang/lib/Frontend/PCHReader.cpp | |
parent | 37467813c561870cb95c8ad9c07e2c0338e47e10 (diff) | |
download | bcm5719-llvm-512b07780327f392833bded86f0277f13a61db44.tar.gz bcm5719-llvm-512b07780327f392833bded86f0277f13a61db44.zip |
PCH support for all of the predefined Objective-C types, such as id,
SEL, Class, Protocol, CFConstantString, and
__objcFastEnumerationState. With this, we can now run the Objective-C
methods and properties PCH tests.
llvm-svn: 69932
Diffstat (limited to 'clang/lib/Frontend/PCHReader.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHReader.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp index d225c68392f..2caab328d9a 100644 --- a/clang/lib/Frontend/PCHReader.cpp +++ b/clang/lib/Frontend/PCHReader.cpp @@ -1948,7 +1948,19 @@ PCHReader::PCHReadResult PCHReader::ReadPCH(const std::string &FileName) { // Load the special types. Context.setBuiltinVaListType( GetType(SpecialTypes[pch::SPECIAL_TYPE_BUILTIN_VA_LIST])); - + if (unsigned Id = SpecialTypes[pch::SPECIAL_TYPE_OBJC_ID]) + Context.setObjCIdType(GetType(Id)); + if (unsigned Sel = SpecialTypes[pch::SPECIAL_TYPE_OBJC_SELECTOR]) + Context.setObjCSelType(GetType(Sel)); + if (unsigned Proto = SpecialTypes[pch::SPECIAL_TYPE_OBJC_PROTOCOL]) + Context.setObjCProtoType(GetType(Proto)); + if (unsigned Class = SpecialTypes[pch::SPECIAL_TYPE_OBJC_CLASS]) + Context.setObjCClassType(GetType(Class)); + if (unsigned String = SpecialTypes[pch::SPECIAL_TYPE_CF_CONSTANT_STRING]) + Context.setCFConstantStringType(GetType(String)); + if (unsigned FastEnum + = SpecialTypes[pch::SPECIAL_TYPE_OBJC_FAST_ENUMERATION_STATE]) + Context.setObjCFastEnumerationStateType(GetType(FastEnum)); // If we saw the preprocessor block, read it now. if (PreprocessorBlockOffset) { SavedStreamPosition SavedPos(Stream); |