summaryrefslogtreecommitdiffstats
path: root/clang/Driver/ASTConsumers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move <root>/Driver into <root>/tools/clang-cc.Daniel Dunbar2009-03-241-1074/+0
| | | | | | Again, I tried to update cmake but it is untested. llvm-svn: 67605
* Eliminate CXXClassVarDecl. It doesn't add anythingDouglas Gregor2009-03-111-5/+0
| | | | llvm-svn: 66696
* Fix warnings in build on clang-x86_64-freebsd buildbot.Mike Stump2009-03-071-2/+3
| | | | llvm-svn: 66344
* Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*Daniel Dunbar2009-03-021-1/+1
| | | | | | driver taking lib/Driver. llvm-svn: 65811
* Eliminate CXXRecordTypeDouglas Gregor2009-02-281-6/+7
| | | | llvm-svn: 65671
* Create a new TypeNodes.def file that enumerates all of the types,Douglas Gregor2009-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... llvm-svn: 65591
* remove some more methods from objc decls, using the iteratorChris Lattner2009-02-201-5/+5
| | | | | | interfaces more consistently. llvm-svn: 65138
* Change ObjCForwardProtocolDecl to use an ObjCList.Chris Lattner2009-02-201-4/+4
| | | | llvm-svn: 65131
* move the interace list of @class to use ObjCList.Chris Lattner2009-02-201-5/+4
| | | | llvm-svn: 65129
* castToDeclContext/castFromDeclContext are not meant to be used directly; ↵Argyrios Kyrtzidis2009-02-161-18/+18
| | | | | | | | they are used indirectly by cast/dyn_cast. All Decl <-> DeclContext casting should be done through cast/dyn_cast. llvm-svn: 64631
* Fix typo in printing of __private_extern__.Daniel Dunbar2009-02-131-1/+1
| | | | llvm-svn: 64501
* Add private extern to pretty printer(s).Mike Stump2009-02-101-5/+6
| | | | llvm-svn: 64258
* Fixup -ast-print so that:Mike Stump2009-02-101-10/+89
| | | | | | | | | | | | | | We handle indentation of decls better. We Indent extern "C" { } stuff better. We print out structure contents more often. We handle pass indentation information into the statement printer, so that nested things come out more indented. We print out FieldDecls. We print out Vars. We print out namespaces. We indent functions better. llvm-svn: 64232
* Basic representation of C++ class templates, from Andrew Sutton.Douglas Gregor2009-02-041-0/+15
| | | | llvm-svn: 63750
* Make -ast-dump print Objective-C method declarations (and otherDouglas Gregor2009-01-231-3/+3
| | | | | | Objective-C declarations!) again. Fixes <rdar://problem/6517155> llvm-svn: 62826
* Remove ScopedDecl, collapsing all of its functionality into Decl, soDouglas Gregor2009-01-201-4/+4
| | | | | | | | | | | | | | | | that every declaration lives inside a DeclContext. Moved several things that don't have names but were ScopedDecls (and, therefore, NamedDecls) to inherit from Decl rather than NamedDecl, including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't store empty DeclarationNames for these things, nor do we try to insert them into DeclContext's lookup structure. The serialization tests are temporarily disabled. We'll re-enable them once we've sorted out the remaining ownership/serialiazation issues between DeclContexts and TranslationUnion, DeclGroups, etc. llvm-svn: 62562
* this massive patch introduces a simple new abstraction: it makesChris Lattner2009-01-171-3/+3
| | | | | | | | | | | | | | | "FileID" a concept that is now enforced by the compiler's type checker instead of yet-another-random-unsigned floating around. This is an important distinction from the "FileID" currently tracked by SourceLocation. *That* FileID may refer to the start of a file or to a chunk within it. The new FileID *only* refers to the file (and its #include stack and eventually #line data), it cannot refer to a chunk. FileID is a completely opaque datatype to all clients, only SourceManager is allowed to poke and prod it. llvm-svn: 62407
* DeclContext::KindTrait was not meant to be used outside of ↵Argyrios Kyrtzidis2009-01-131-2/+1
| | | | | | | | DeclContext::CastTo (causes compilation error on MSVC). Add DeclContext::getDeclKind() and use that instead of DeclContext::KindTrait. llvm-svn: 62164
* Print function parameters in DeclContextPrinter.Zhongxing Xu2009-01-131-0/+37
| | | | llvm-svn: 62153
* Improve c++ methods printing in DeclContextPrinter.Zhongxing Xu2009-01-131-16/+39
| | | | llvm-svn: 62143
* Improve DeclContextPrinter: print enum name.Zhongxing Xu2009-01-131-2/+8
| | | | llvm-svn: 62140
* Add an initial framework of a DeclContextPrinter. It can print DeclContext andZhongxing Xu2009-01-131-0/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | its Decls in indented format. An Example: $ cat t.cpp class A { int a; void f(); }; void A::f() { a = 3; } $ clang -print-decl-contexts t.cpp [translation unit] 0x9754d7c <typedef> __builtin_va_list [class] A 0x9753310 <class> A 0x975ce20 <field> a <c++ method> f <c++ ctor> A <c++ ctor> A <c++ method> operator= <c++ dtor> ~A [c++ method] f [[0x9753310]] Some comments: '<>' indicates a declaration, '[]' indicates a definition, '[[ ]]' displays the semantic DeclContext which is different from the lexical DeclContext. The symbols printed can definitely be changed in the future. llvm-svn: 62136
* Provide a new kind of iterator, the specific_decl_iterator, thatDouglas Gregor2009-01-091-1/+1
| | | | | | | | | filters the decls seen by decl_iterator with two criteria: the dynamic type of the declaration and a run-time predicate described by a member function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl considerably. It has no measurable performance impact. llvm-svn: 61994
* Move property API's up to ObjCContainerDecl (removing a lot of duplicate code).Steve Naroff2009-01-091-6/+6
| | | | | | | | | Add isa/cast/dyncast support for ObjCContainerDecl. Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing). More simplifications to Sema::ActOnAtEnd()... Added/changed some FIXME's as a result of the above work. llvm-svn: 61988
* Introduce support for "transparent" DeclContexts, which areDouglas Gregor2009-01-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | DeclContexts whose members are visible from enclosing DeclContexts up to (and including) the innermost enclosing non-transparent DeclContexts. Transparent DeclContexts unify the mechanism to be used for various language features, including C enumerations, anonymous unions, C++0x inline namespaces, and C++ linkage specifications. Please refer to the documentation in the Clang internals manual for more information. Only enumerations and linkage specifications currently use transparent DeclContexts. Still to do: use transparent DeclContexts to implement anonymous unions and GCC's anonymous structs extension, and, later, the C++0x features. We also need to tighten up the DeclContext/ScopedDecl link to ensure that every ScopedDecl is in a single DeclContext, which will ensure that we can then enforce ownership and reduce the memory footprint of DeclContext. llvm-svn: 61735
* Make sure that enumerators show up within the enumeration declaration. ↵Douglas Gregor2008-12-171-0/+7
| | | | | | Fixes. PR clang/3220 llvm-svn: 61116
* Make linkage-specifications hold on to all of their declarationsDouglas Gregor2008-12-161-3/+13
| | | | llvm-svn: 61110
* Fix crash with -ast-dump in C++.Eli Friedman2008-12-161-2/+3
| | | | llvm-svn: 61108
* Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of Chris Lattner2008-11-241-29/+31
| | | | | | | | | | | uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. llvm-svn: 59947
* Rename Selector::getName() to Selector::getAsString(), and addChris Lattner2008-11-241-4/+4
| | | | | | | | | | | | | a new NamedDecl::getAsString() method. Change uses of Selector::getName() to just pass in a Selector where possible (e.g. to diagnostics) instead of going through an std::string. This also adds new formatters for objcinstance and objcclass as described in the dox. llvm-svn: 59933
* Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'Ted Kremenek2008-11-031-1/+1
| | | | llvm-svn: 58646
* Move viewInheritance to CXXRecordDecl, and make sure it builds in Release ↵Douglas Gregor2008-10-241-2/+1
| | | | | | mode, too llvm-svn: 58105
* Added driver option "-cxx-inheritance-view" for viewing the C++ hierarchy of ↵Ted Kremenek2008-10-231-0/+29
| | | | | | a class in GraphViz. llvm-svn: 58051
* Commito, didn't mean to remove this header.Daniel Dunbar2008-10-211-0/+1
| | | | llvm-svn: 57938
* [LLVM up] Add basic -S option to clang.Daniel Dunbar2008-10-211-84/+0
| | | | | | | | | | | - Split backend related consumer out into Backend.cpp, replaces LLVMCodeGenWriter. - Structure follows llvm-gcc to some extent. - Still need to implement all the options which impact code generation and the optimization passes which llvm-gcc uses at various levels. llvm-svn: 57936
* Add dummy -ast-dump support for ObjC category implementations.Daniel Dunbar2008-10-051-0/+2
| | | | llvm-svn: 57087
* Patch by Csaba Hruska!Ted Kremenek2008-09-131-5/+11
| | | | | | | "Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch covers the AST library, but ignores Analysis lib." llvm-svn: 56185
* Rename ObjCPropertyImplDecl::PropertyImplKind (consistency)Daniel Dunbar2008-08-261-2/+1
| | | | | | | | | - Change enum name to Kind. - Change enum constants to English strings. Also, fix getPropertyImplementation (which probably should be renamed) llvm-svn: 55354
* Moved HTMLDiagnostics to lib/Driver.Zhongxing Xu2008-08-241-1/+1
| | | | llvm-svn: 55274
* adjust to changes in various APIs from LLVM. We can't printChris Lattner2008-08-231-1/+1
| | | | | | | | an APInt directly to an ostream now, so add some hacks. It would be better to switch all of the bugreport (and friends) stuff over to raw_ostream. llvm-svn: 55264
* improve pretty printing of objc method declaration, Chris Lattner2008-08-221-4/+15
| | | | | | patch contributed by Benjamin Stiglitz! llvm-svn: 55170
* Do not crash with -serialize.Nico Weber2008-08-101-14/+7
| | | | | | This happened because seralization was done in the constructor, and at that time the TranslationUnit is no longer valid. llvm-svn: 54618
* do not serialize invalid asts. this fixes bug #2637Nico Weber2008-08-091-6/+12
| | | | llvm-svn: 54590
* Let LLVMCodeGenWriter forward all the methods defined in ASTConsumer, toMatthijs Kooijman2008-08-071-1/+9
| | | | | | prevent unexpected surprises later on. llvm-svn: 54469
* Refactored driver logic for CodeGen into LLVMCodeGenWriter. This ↵Ted Kremenek2008-08-051-0/+76
| | | | | | ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk. This layering takes this logic out of clang.cpp and puts it directly into the ASTConsumer interface. The benefit is that now --emit-llvm works with both serialized ASTs and regular source files. llvm-svn: 54364
* introduce a new ObjCList templated class and start moving Chris Lattner2008-07-211-10/+8
| | | | | | | various objc lists over to it. First up, the protocol list on ObjCInterfaceDecl. llvm-svn: 53856
* Moved logic for -dump-cfg and -view-cfg into AnalysisConsumer.Ted Kremenek2008-07-021-88/+0
| | | | | | Renamed -dump-cfg to -cfg-dump, and -view-cfg to -cfg-view. This naming better matches the same options for asts (e.g. -ast-dump). llvm-svn: 53041
* Move -dump-live-variables logic to AnalysisConsumer.Ted Kremenek2008-07-021-30/+0
| | | | llvm-svn: 53039
* Migrate CheckerConsumer diagnostics to the new AnalysisConsumer interface.Ted Kremenek2008-07-021-98/+0
| | | | | | Remove CheckerConsumer. llvm-svn: 53029
* Move logic for "-checker-simple" to the new AnalysisConsumer interface.Ted Kremenek2008-07-021-33/+0
| | | | llvm-svn: 53028
OpenPOWER on IntegriCloud