summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.Chris Lattner2009-06-301-1/+1
| | | | | | | | | | | | This is simple enough, but then I thought it would be nice to make PrintingPolicy get a LangOptions so that various things can key off "bool" and "C++" independently. This spiraled out of control. There are many fixme's, but I think things are slightly better than they were before. One thing that can be improved: CFG should probably have an ASTContext pointer in it, which would simplify its clients. llvm-svn: 74493
* Revrt PR4228 fix for now.Devang Patel2009-06-261-40/+20
| | | | llvm-svn: 74304
* Add a DecltypeType type.Anders Carlsson2009-06-241-0/+3
| | | | llvm-svn: 74099
* First step toward fixing <rdar://problem/6613046> refactor clang objc type ↵Steve Naroff2009-06-171-1/+1
| | | | | | | | | | | | representation. 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
* It is possible that main input file does not have any symbol with debug ↵Devang Patel2009-06-161-20/+40
| | | | | | | | info. To handle this edge case, always create main compile unit first. This fixes PR 4228. llvm-svn: 73520
* Create a new PrintingPolicy class, which we pass down through the ASTDouglas Gregor2009-05-291-1/+3
| | | | | | | | | printing logic to help customize the output. For now, we use this rather than a special flag to suppress the "struct" when printing "struct X" and to print the Boolean type as "bool" in C++ but "_Bool" in C. llvm-svn: 72590
* Use .data() instead of &...[0].Daniel Dunbar2009-05-261-5/+5
| | | | | | - Just SmallVectors this time. llvm-svn: 72432
* Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad2009-05-211-2/+2
| | | | llvm-svn: 72210
* Debug info: Initialize runtime language field correctly for Objective-CDaniel Dunbar2009-05-181-1/+1
| | | | | | interface types. llvm-svn: 72036
* Enhance debug information for block literals. Radar 6867696Mike Stump2009-05-141-2/+131
| | | | llvm-svn: 71763
* We need to specify the "linkage name" to the subprogram now that weDaniel Dunbar2009-05-141-1/+5
| | | | | | | emit the correct "display name". I suspect we need more work here, see FIXME for example. llvm-svn: 71761
* Make sure not to include the LLVM asm prefix in function names forDaniel Dunbar2009-05-131-0/+4
| | | | | | debug info. llvm-svn: 71736
* fix some more cases where we'd emit a file with a line of 0 for implicitChris Lattner2009-05-051-5/+13
| | | | | | | types. In this case, it was objc_selector and objc_class. This fixes rdar://6852754 - clang sometimes generates incorrect/unknown file/line info for DW_TAG__structure_type dies llvm-svn: 70969
* Do not generate bogus location info for DW_TAG_inheritanceChris Lattner2009-05-051-1/+1
| | | | | | | | DIEs. We were generating a loc with line of 0 and a file. These tags do not need locations at all, just remove it. this fixes rdar://6852792 - Clang generates incorrect (and unnecessary) file and line info for DW_TAG_inheritance dies llvm-svn: 70966
* Fix generated debug info for decls with no location (which include self/_cmdChris Lattner2009-05-051-4/+10
| | | | | | | | in ObjC) to not emit file/line location information. Previously we would output a file with bogus line information. This fixes: rdar://6852814 - Clang generates incorrect file & line info for automatic/understood formal parameters for objc-programs llvm-svn: 70965
* PR4143: don't crash generating debug info for incomplete enum types.Eli Friedman2009-05-041-2/+6
| | | | llvm-svn: 70825
* When creating a dwarf record type for an objc interface, make sure to propagateChris Lattner2009-05-021-2/+6
| | | | | | | the runtime version number onto it, so that the debugger knows it's an objc interface, not a C struct. rdar://6848435 llvm-svn: 70618
* capture whether optimizations are enabled or not in debug infoChris Lattner2009-05-021-2/+2
| | | | llvm-svn: 70617
* encode the version of the objc runtime into the dwarf compile unit. ↵Chris Lattner2009-05-021-4/+11
| | | | | | | | rdar://6848435, several other fixes coming. llvm-svn: 70616
* While generating debug info ignore unnamed fields.Devang Patel2009-04-271-0/+8
| | | | llvm-svn: 70266
* Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.Eli Friedman2009-04-261-5/+3
| | | | llvm-svn: 70145
* Handle corner case where clang-cc is invoked directly to compile ↵Devang Patel2009-04-231-8/+14
| | | | | | | | preprocessed source file without -main-file-name. In this case, CDDebugInfo is not able identify correct main source file becase SM.isFromMainFile() returns true for locations from header files as well as locations from main source file. This patch takes conservative approach by not emitting more then one compile unit with isMain bit set. llvm-svn: 69902
* implement debug info for _Complex.Chris Lattner2009-04-231-1/+17
| | | | llvm-svn: 69873
* implement debug info support for id<proto> and interface<proto>Chris Lattner2009-04-221-9/+9
| | | | llvm-svn: 69784
* ObjCQualifiedClass is dead, remove it.Chris Lattner2009-04-221-1/+0
| | | | llvm-svn: 69783
* silence a warning, I need to talk to Devang about this code.Chris Lattner2009-04-191-1/+1
| | | | llvm-svn: 69517
* Use PresumedLoc to record line number in debug info entries.Devang Patel2009-04-171-11/+22
| | | | llvm-svn: 69389
* Appropriately set file name and directory name in debug info compile units.Devang Patel2009-04-171-26/+30
| | | | llvm-svn: 69387
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-091-4/+5
| | | | | | No functionality change (really). llvm-svn: 68726
* Use presumed location to get line number info.Devang Patel2009-04-081-3/+3
| | | | llvm-svn: 68630
* Make debug info work when using -save-temps.Daniel Dunbar2009-04-081-0/+6
| | | | | | | | | | | | | | | | | | - This is pretty ugly, but the most obvious solution. Chime in if you have a nicer one. - The problem is that with -save-temps, clang-cc has no idea what the name of the original input file is. However, the user expects to be able to set breakpoints based on the input file name. - We support this by providing a new option -main-file-name (similar to -dumpbase used by gcc) which allows the driver to pass in the original file name. - <rdar://problem/6753383> building with clang using --save-temps gets the compile unit name from the .i file... llvm-svn: 68595
* 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
OpenPOWER on IntegriCloud