- Jul 28, 2009
-
-
Mike Stump authored
llvm-svn: 77291
-
- Jul 21, 2009
-
-
Argyrios Kyrtzidis authored
Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality. llvm-svn: 76510
-
- Jul 18, 2009
-
-
Steve Naroff authored
llvm-svn: 76321
-
Zhongxing Xu authored
llvm-svn: 76303
-
- Jul 17, 2009
-
-
Ted Kremenek authored
until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. llvm-svn: 76193
-
Ted Kremenek authored
Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. llvm-svn: 76139
-
- Jul 15, 2009
-
-
Steve Naroff authored
Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective). This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-). This patch also adds Type::isObjCBuiltinType(). This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small. llvm-svn: 75808
-
- Jul 14, 2009
-
-
Alisdair Meredith authored
llvm-svn: 75622
-
- Jul 11, 2009
-
-
Steve Naroff authored
The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. llvm-svn: 75314
-
- Jul 07, 2009
-
-
Douglas Gregor authored
FILE type, rather than using name lookup to find FILE within the translation unit. Within precompiled headers, FILE is treated as yet another "special type" (like __builtin_va_list). This change should provide a performance improvement (not verified), since the lookup into the translation unit declaration forces the (otherwise unneeded) construction of a large hash table. More importantly, with precompiled headers, the construction of that table requires deserializing most of the top-level declarations from the precompiled header, which are then unused. Fixes PR 4509. llvm-svn: 74911
-
Douglas Gregor authored
with a particular system root directory and can be used with a different system root directory when the headers it depends on have been installed. Relocatable precompiled headers rewrite the file names of the headers used when generating the PCH file into the corresponding file names of the headers available when using the PCH file. Addresses <rdar://problem/7001604>. llvm-svn: 74885
-
- Jul 06, 2009
-
-
Douglas Gregor authored
of a top-level declaration loads another top-level declaration of the same name whose type depends on the first declaration having been completed. This commit breaks the circular dependency by delaying loads of top-level declarations triggered by loading a name until we are no longer recursively loading types or declarations. llvm-svn: 74847
-
Douglas Gregor authored
from Enea Zaffanella! llvm-svn: 74831
-
- Jul 02, 2009
-
-
Douglas Gregor authored
declaration in the AST. The new ASTContext::getCommentForDecl function searches for a comment that is attached to the given declaration, and returns that comment, which may be composed of several comment blocks. Comments are always available in an AST. However, to avoid harming performance, we don't actually parse the comments. Rather, we keep the source ranges of all of the comments within a large, sorted vector, then lazily extract comments via a binary search in that vector only when needed (which never occurs in a "normal" compile). Comments are written to a precompiled header/AST file as a blob of source ranges. That blob is only lazily loaded when one requests a comment for a declaration (this never occurs in a "normal" compile). The indexer testbed now supports comment extraction. When the -point-at location points to a declaration with a Doxygen-style comment, the indexer testbed prints the associated comment block(s). See test/Index/comments.c for an example. Some notes: - We don't actually attempt to parse the comment blocks themselves, beyond identifying them as Doxygen comment blocks to associate them with a declaration. - We won't find comment blocks that aren't adjacent to the declaration, because we start our search based on the location of the declaration. - We don't go through the necessary hops to find, for example, whether some redeclaration of a declaration has comments when our current declaration does not. Similarly, we don't attempt to associate a \param Foo marker in a function body comment with the parameter named Foo (although that is certainly possible). - Verification of my "no performance impact" claims is still "to be done". llvm-svn: 74704
-
- Jun 26, 2009
-
-
Nate Begeman authored
llvm-svn: 74221
-
Nate Begeman authored
llvm-svn: 74220
-
- Jun 24, 2009
-
-
Anders Carlsson authored
llvm-svn: 74099
-
- Jun 19, 2009
-
-
Argyrios Kyrtzidis authored
llvm-svn: 73762
-
Argyrios Kyrtzidis authored
Make changes to PCHReader to allow reading a PCH file without having a pre-initialized Preprocessor. -Introduce 'PCHReaderListener' which is an abstract interface for getting various information from the PCHReader. -If PCHReader is constructed without a Preprocessor, it can still load the file and invoke the callbacks of PCHReaderListener. -If PCHReader is constructed with an initialized Preprocessor, PCHValidator is used as a PCHReaderListener to validate the contents of the PCH file against the given Preprocessor. llvm-svn: 73741
-
- Jun 18, 2009
-
-
rdar://problem/6613046Steve Naroff authored
Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType). This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types). No functionality change. llvm-svn: 73649
-
- Jun 15, 2009
-
-
Chris Lattner authored
like: fatal error: could not find file '1.h' referenced by PCH file instead of aborting with an assertion failure, PR4219 llvm-svn: 73371
-
- Jun 05, 2009
-
-
Eli Friedman authored
llvm-svn: 72928
-
- May 28, 2009
-
-
Sebastian Redl authored
Reintroduce the home for exception specs, and make Sema fill it. However, keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere. llvm-svn: 72498
-
- May 23, 2009
-
-
Douglas Gregor authored
llvm::SmallVector, using data() instead of &[0]. The PCH testsuite now runs cleanly (again). llvm-svn: 72292
-
- May 21, 2009
-
-
Jay Foad authored
llvm-svn: 72210
-
- May 13, 2009
-
-
Anders Carlsson authored
Disable access control by default. It can be enabled with the -faccess-control option. When we have better support for it, we can enable it by default again. llvm-svn: 71706
-
- May 12, 2009
-
-
Douglas Gregor authored
(with -E), we turn the PCH include into an implicit include of the file from which the PCH file was generated. llvm-svn: 71534
-
- May 10, 2009
-
-
Sebastian Redl authored
llvm-svn: 71405
-
- May 07, 2009
-
-
Sebastian Redl authored
Back out r70506 (exception spec in AST) again. We won't have exception specs until we've had a lot more discussion. llvm-svn: 71125
-
- Apr 30, 2009
-
-
Sebastian Redl authored
llvm-svn: 70506
-
Chris Lattner authored
compatible with VC++ and GCC. The codegen/mangling angle hasn't been fully ironed out yet. Note that we accept int128_t even in 32-bit mode, unlike gcc. llvm-svn: 70464
-
- Apr 29, 2009
-
-
Douglas Gregor authored
compilation if the user requested a PCH file but no such PCH file exists. llvm-svn: 70332
-
- Apr 28, 2009
-
-
Douglas Gregor authored
llvm-svn: 70330
-
Douglas Gregor authored
now gotten back about 180k of the 500k we lost. llvm-svn: 70326
-
Douglas Gregor authored
which eliminates the storage for IdentifierInfo in the "uninteresting identifier" cases. Sadly, this only brought back 7k of the 500k we lost :( llvm-svn: 70325
-
Douglas Gregor authored
llvm-svn: 70322
-
Douglas Gregor authored
line when using a PCH that were not provided when building the PCH file. If those names were used as identifiers somewhere in the PCH file, reject the PCH file. llvm-svn: 70321
-
Douglas Gregor authored
for identifiers to separate "interesting" from "uninteresting" identifiers. However, to cope with compiler invocations where the predefines buffers mismatch, we need to be able to search the complete identifier table. Cocoa.h.pch is now about 500k larger that it used to be :( llvm-svn: 70320
-
Douglas Gregor authored
PCH file and the predefines buffer used when including the PCH file. We (explicitly) detect conflicting macro definitions (rejecting the PCH file) and about missing macro definitions (they'll be automatically pulled from the PCH file anyway). We're missing some checking to make sure that new macro definitions won't have any impact on the PCH file itself (e.g., #define'ing an identifier that the PCH file used). llvm-svn: 70316
-
Eli Friedman authored
llvm-svn: 70282
-