summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* remove ASTContext::buildObjCInterfaceType, which breaks canonical Chris Lattner2009-04-011-1/+1
| | | | | | | | types. It is no longer needed now that the code generator re-lays-out interfaces if they are defines after being laid out from a forward decl. llvm-svn: 68194
* Improve the representation of template names in the AST. ThisDouglas Gregor2009-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | representation handles the various ways in which one can name a template, including unqualified references ("vector"), qualified references ("std::vector"), and dependent template names ("MetaFun::template apply"). One immediate effect of this change is that the representation of nested-name-specifiers in type names for class template specializations (e.g., std::vector<int>) is more accurate. Rather than representing std::vector<int> as std::(vector<int>) we represent it as (std::vector)<int> which more closely follows the C++ grammar. Additionally, templates are no longer represented as declarations (DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new OpaquePtr type (TemplateTy) that holds the representation of a TemplateName. This will simplify the handling of dependent template-names, once we get there. llvm-svn: 68074
* Do not emit debug information for variables while generating optimized code. ↵Devang Patel2009-03-271-0/+16
| | | | | | The llvm optimizer and code generator are not yet ready to support optimized code debugging. llvm-svn: 67876
* simplify some conditionals, don't copy LangOptions.Chris Lattner2009-03-251-11/+15
| | | | llvm-svn: 67674
* Encode language.Devang Patel2009-03-241-4/+15
| | | | llvm-svn: 67650
* Fix ivar's size encoding.Devang Patel2009-03-201-4/+17
| | | | llvm-svn: 67389
* Encode ivar access control info.Devang Patel2009-03-191-2/+10
| | | | llvm-svn: 67267
* Introduce a representation for types that we referred to via aDouglas Gregor2009-03-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qualified name, e.g., foo::x so that we retain the nested-name-specifier as written in the source code and can reproduce that qualified name when printing the types back (e.g., in diagnostics). This is PR3493, which won't be complete until finished the other tasks mentioned near the end of this commit. The parser's representation of nested-name-specifiers, CXXScopeSpec, is now a bit fatter, because it needs to contain the scopes that precede each '::' and keep track of whether the global scoping operator '::' was at the beginning. For example, we need to keep track of the leading '::', 'foo', and 'bar' in ::foo::bar::x The Action's CXXScopeTy * is no longer a DeclContext *. It's now the opaque version of the new NestedNameSpecifier, which contains a single component of a nested-name-specifier (either a DeclContext * or a Type *, bitmangled). The new sugar type QualifiedNameType composes a sequence of NestedNameSpecifiers with a representation of the type we're actually referring to. At present, we only build QualifiedNameType nodes within Sema::getTypeName. This will be extended to other type-constructing actions (e.g., ActOnClassTemplateId). Also on the way: QualifiedDeclRefExprs will also store a sequence of NestedNameSpecifiers, so that we can print out the property nested-name-specifier. I expect to also use this for handling dependent names like Fibonacci<I - 1>::value. llvm-svn: 67265
* Fix struct field's debug info.Devang Patel2009-03-161-3/+15
| | | | llvm-svn: 67062
* Almost complete implementation of rvalue references. One bug, and a few ↵Sebastian Redl2009-03-161-1/+2
| | | | | | unclear areas. Maybe Doug can shed some light on some of the fixmes. llvm-svn: 67059
* Emit super class debug info.Devang Patel2009-03-101-0/+11
| | | | llvm-svn: 66580
* Set isMain bit for MainFile.Devang Patel2009-03-051-1/+3
| | | | llvm-svn: 66120
* Enable Objective-C interface debug info.Devang Patel2009-03-021-1/+2
| | | | llvm-svn: 65850
* Eliminate CXXRecordTypeDouglas Gregor2009-02-281-1/+0
| | | | llvm-svn: 65671
* Fix enumeration in switch warnings. No behavior change.Eli Friedman2009-02-271-0/+6
| | | | llvm-svn: 65659
* Create a new TypeNodes.def file that enumerates all of the types,Douglas Gregor2009-02-261-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add support to emit debug info for objective-c interfaces.Devang Patel2009-02-261-1/+115
| | | | | | (This is not yet used.) llvm-svn: 65573
* Fix comments.Devang Patel2009-02-251-3/+3
| | | | llvm-svn: 65423
* If Loc is invalid (e.g. "self" in Objective-C) then use MainFileID's compile ↵Devang Patel2009-02-241-1/+4
| | | | | | unit. llvm-svn: 65403
* Renamed ASQualType to ExtQualType to reflect its moreFariborz Jahanian2009-02-171-1/+1
| | | | | | | general use; as for, objc2's gc type attributes. No change in functionality. llvm-svn: 64778
* When making dummy file entries, the directory name should also beDaniel Dunbar2009-02-071-1/+1
| | | | | | non-empty. llvm-svn: 63986
* lower the interface to getLineNumber like we did forChris Lattner2009-02-041-1/+2
| | | | | | | | getColumnNumber. This fixes a FIXME in SourceManager::getPresumedLoc because we now just decompose the sloc once. llvm-svn: 63701
* fix PR3427: fix debuginfo for incomplete array typesNuno Lopes2009-01-281-2/+5
| | | | llvm-svn: 63158
* Allow creation of "dummy" compile units for debug information.Daniel Dunbar2009-01-221-10/+13
| | | | | | | | - Although gross, this is needed currently to ensure that we produce well formed debug information (to match pace with the assertions being added to DebugInfo in LLVM). llvm-svn: 62734
* Update for new SourceLocation API.Daniel Dunbar2009-01-201-0/+1
| | | | llvm-svn: 62556
* Rename SourceManager::getCanonicalFileID -> getFileID. There isChris Lattner2009-01-191-1/+1
| | | | | | no longer such thing as a non-canonical FileID. llvm-svn: 62499
* remove the SourceManager:: and FullSourceLoc::getFileEntryForLoc methods.Chris Lattner2009-01-191-1/+1
| | | | llvm-svn: 62496
* more SourceLocation lexicon change: instead of referring to theChris Lattner2009-01-161-12/+12
| | | | | | "logical" location, refer to the "instantiation" location. llvm-svn: 62316
* Generate debug info for VLA typesAnders Carlsson2009-01-051-3/+14
| | | | llvm-svn: 61661
* Actually distinguish between RecordDecl::field_iterator and ↵Douglas Gregor2008-12-111-3/+4
| | | | | | RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls. llvm-svn: 60883
* Unifies the name-lookup mechanisms used in various parts of the ASTDouglas Gregor2008-12-111-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). llvm-svn: 60878
* Convert incomplete array types before emitting debug info for them, fixes ↵Anders Carlsson2008-11-261-2/+15
| | | | | | PR3134. llvm-svn: 60109
* Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of Chris Lattner2008-11-241-2/+2
| | | | | | | | | | | 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 NamedDecl::getIdentifierName() to ::getNameAsCString() and make itChris Lattner2008-11-241-9/+7
| | | | | | | | | assert if the name is not an identifier. Update callers to do the right thing and avoid this method in unsafe cases. This also fixes an objc warning that was missing a space, and migrates a couple more to taking IdentifierInfo and QualTypes instead of std::strings. llvm-svn: 59936
* Introduction the DeclarationName class, as a single, general method ofDouglas Gregor2008-11-171-5/+6
| | | | | | | | representing the names of declarations in the C family of languages. DeclarationName is used in NamedDecl to store the name of the declaration (naturally), and ObjCMethodDecl is now a NamedDecl. llvm-svn: 59441
* implement debug info for typeof()Chris Lattner2008-11-111-6/+9
| | | | llvm-svn: 59032
* Fix even more bugs in debug info support:Chris Lattner2008-11-101-5/+0
| | | | | | | | | 1. emit proper debug info for forward decls of structs. 2. emit DW_TAG_member nodes around members of a field like llvm-gcc does. This slows down debug info generation, but is required for correctness. llvm-svn: 58973
* reimplement debug info generation in terms of DebugInfo.h instead ofChris Lattner2008-11-101-638/+371
| | | | | | | using MachineModuleInfo. This runs at about the same speed as the old code, but fixes a bunch of bugs and is simpler and shorter. llvm-svn: 58971
* Avoid redundant cast<>s / simplify type dispatch.Daniel Dunbar2008-11-081-39/+28
| | | | llvm-svn: 58892
* "Fix" PR3021, don't crash on generating record types when we can'tDaniel Dunbar2008-11-081-2/+6
| | | | | | generate the type of a member. llvm-svn: 58889
* Move IRBuilder type definition to common file.Daniel Dunbar2008-11-011-6/+5
| | | | | | - No functionality change. llvm-svn: 58546
* Debug info: Bug fix, function types should always include the returnDaniel Dunbar2008-10-311-1/+1
| | | | | | type. llvm-svn: 58497
* Quick fix for PR2950, infinite loop generating debug info forDaniel Dunbar2008-10-311-16/+19
| | | | | | | recursive types. - Style will be clean up in further patches. llvm-svn: 58490
* Formatting tweaks.Daniel Dunbar2008-10-311-9/+8
| | | | | | - No functionality change. llvm-svn: 58488
* Don't crash on invalid source locations inDaniel Dunbar2008-10-241-3/+6
| | | | | | CGDebugInfo::getOrCreateCompileUnit. llvm-svn: 58081
* Map compilation units using FileEntry pointers instead ofDaniel Dunbar2008-10-241-10/+7
| | | | | | | | | FileIDs. This seems better conceptually and lets the SourceManager handle details of mapping the location to a file ID. - In practice, fixes an assert because this code wasn't using getPhysicalLoc. llvm-svn: 58055
* Debug info bug fix, function start wasn't getting generated correctlyDaniel Dunbar2008-10-181-5/+5
| | | | | | for Obj-C methods. llvm-svn: 57769
* Change CGDebugInfo::setLocation to just ignore invalid locations. ThisDaniel Dunbar2008-10-171-1/+5
| | | | | | | | | simplifies clients. Also, add assert that RegionStack is empty when the CGDebugInfo is destroyed. llvm-svn: 57684
* Quick patch for PR2784, assert genereting debug info for opaqueDaniel Dunbar2008-10-171-1/+9
| | | | | | | | | | structure. - I'm not sure yet about the behavior, but this at least prevents the crash. Add some asserts on RegionStack usage. llvm-svn: 57661
* More #include cleaningDaniel Dunbar2008-08-111-0/+2
| | | | | | | | - Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and SourceLocation.h) - Move ASTContext constructor into implementation llvm-svn: 54627
OpenPOWER on IntegriCloud