summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "DebugInfo: Place global constants in their appropriate context."David Blaikie2014-04-051-4/+1
| | | | | | | | | This reverts commit r205655. Breaks the compiler-rt build with an assertion failure in LLVM... reverting while I investigate. llvm-svn: 205664
* DebugInfo: Place global constants in their appropriate context.David Blaikie2014-04-041-1/+4
| | | | | | | We also don't need to duplicate the name in the LinkageName field. Just leave it empty. llvm-svn: 205655
* DebugInfo: PR19298: function local const variables duplicated in the root scopeDavid Blaikie2014-04-041-0/+3
| | | | | | | | | | | | | | See the comment for CodeGenFunction::tryEmitAsConstant that describes how in some contexts (lambdas) we must not emit references to the variable, but instead use the constant directly - because of this we end up emitting a constant for the variable, as well as emitting the variable itself. Should we just skip putting the variable on the stack at all and omit the debug info for the constant? It's not clear to me - what if the address of the local is taken? llvm-svn: 205651
* DebugInfo: Include default template arguments in template type namesDavid Blaikie2014-04-021-22/+8
| | | | | | | | | | | | | | | This was committed 4 years ago in 108916 with insufficient testing to explain why the "getTypeAsWritten" case was appropriate. Experience says that it isn't - the presence or absence of an explicit instantiation declaration was causing this code to generate either i<int> or i<int, int>. That didn't seem to be a useful distinction, and omitting the template arguments was destructive to debuggers being able to associate the two types across translation units or across compilers (GCC, reasonably, never omitted the arguments). llvm-svn: 205447
* Partially revert r204517 and fix a different way:Eric Christopher2014-04-011-6/+15
| | | | | | | | | | | | | We don't want to encourage the code to emit a lexical block for a function that needs one in order for the line table to change, we need to grab the line information from the body of the pattern that we were instantiated from, this code should do that. Modify the test case to ensure that we're still looking in the right place for all of the scopes and also that we haven't created a lexical block where we didn't need one. llvm-svn: 205368
* Debug info: fix a crash when emitting IndirectFieldDecls, which wereAdrian Prantl2014-04-011-1/+1
| | | | | | | previously not handled at all. rdar://problem/16348575 llvm-svn: 205331
* Adapt CGDebugInfo to interface changes in DIBuilder/DIImportedEntity.Adrian Prantl2014-04-011-4/+4
| | | | | | | The Decl field in a DIImportedEntity is now a DIRef. Paired commit with LLVM. llvm-svn: 205278
* Add an explanatory comment and FIXME about the function declarationEric Christopher2014-03-271-0/+5
| | | | | | for a subprogram DIE. llvm-svn: 204949
* Revert "Just call getContextDescriptor to get the context for subprograms"Eric Christopher2014-03-271-3/+8
| | | | | | | | while I investigate as it seems to be causing issues with the gdb bot. This reverts commit r204874. llvm-svn: 204896
* Just call getContextDescriptor to get the context for subprogramsEric Christopher2014-03-261-8/+3
| | | | | | | | instead of rolling an inefficient version of the function. This changes some order of emission of metadata nodes, fix up those testcases and make them more flexible to some changes. llvm-svn: 204874
* CGDebugInfo: At the end of EmitFunctionStart, Initialize PrevLoc to theAdrian Prantl2014-03-211-1/+4
| | | | | | | | location that the next call emitLocation() would default to. Otherwise setLocation() may wrongly believe that the current source file didn't change, when in fact it did. llvm-svn: 204517
* [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with ↵Aaron Ballman2014-03-141-4/+1
| | | | | | iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203958
* [C++11] Replacing FunctionTemplateDecl iterators spec_begin() and spec_end() ↵Aaron Ballman2014-03-141-4/+2
| | | | | | with iterator_range specializations(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203938
* Renaming the recently-created (r203830) props() range API to properties() ↵Aaron Ballman2014-03-131-1/+1
| | | | | | for clarity. llvm-svn: 203835
* [C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() ↵Aaron Ballman2014-03-131-3/+1
| | | | | | with iterator_range props(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203830
* [C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with ↵Aaron Ballman2014-03-131-6/+5
| | | | | | iterator_range bases(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203803
* [C++11] Replacing RecordDecl iterators field_begin() and field_end() with ↵Aaron Ballman2014-03-081-4/+1
| | | | | | iterator_range fields(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203355
* [C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() ↵Aaron Ballman2014-03-081-3/+1
| | | | | | with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203353
* [C++11] Replacing DeclBase iterators decls_begin() and decls_end() with ↵Aaron Ballman2014-03-071-9/+6
| | | | | | iterator_range decls(). The same is true for the noload versions of these APIs. Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203278
* [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() ↵Aaron Ballman2014-03-071-3/+2
| | | | | | with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203255
* [C++11] Replacing iterators redecls_begin() and redecls_end() with ↵Aaron Ballman2014-03-061-3/+1
| | | | | | iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/end forms to be removed entirely. llvm-svn: 203179
* DebugInfo: Refix r202888 (a fix to r202769) in a different way, ensuring ↵David Blaikie2014-03-041-2/+7
| | | | | | types aren't needlessly built during -gmlt llvm-svn: 202900
* Fix unconditional dereference of a WeakVH in CGDebugInfo TypeCacheReid Kleckner2014-03-041-1/+2
| | | | | | | | | | | | This fails an "isa<> used with null pointer" assert during a clang-cl self-host on Windows. This was caused by r202769, and I'm currently reducing a test case. Reviewers: dblaikie Differential Revision: http://llvm-reviews.chandlerc.com/D2944 llvm-svn: 202888
* DebugInfo: Improvements/corrections to conservative emission of types in ↵David Blaikie2014-03-041-1/+2
| | | | | | | | | explicit template instantiation declarations * detect out of line definitions correctly * detect member function explicit specializations correctly llvm-svn: 202779
* DebugInfo: Emit only the declaration of a class template that has an ↵David Blaikie2014-03-031-18/+51
| | | | | | | | | | | | | | | | | | | | | | | explicit instantiation declaration (& always emit such a type when there's an explicit instantiation definition) We should only have this optimization fire when the explicit instantiation definition would cause at least one member function to be emitted, thus ensuring that even a compiler not performing this optimization would still emit the full type information elsewhere. But we should also pessimize output still by always emitting the definition when the explicit instantiation definition appears so that at some point in the future we can depend on that information even when no code had to be emitted in that TU. (this shouldn't happen very often, since people mostly use explicit spec decl/defs to reduce code size - but perhaps one day they could use it to explicitly reduce debug info size too) This was worth about 2% for Clang and LLVM - so not a huge win, but a win. It looks really great for simple STL programs (include <string> and just declare a string - 14k -> 1.4k of .dwo) llvm-svn: 202769
* Update call DIBuilder::createLexicalBlock.Diego Novillo2014-03-031-1/+2
| | | | | | Create lexical blocks with discriminator value 0 by default. llvm-svn: 202737
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-021-1/+1
| | | | llvm-svn: 202639
* Pass down the debug emission kind into the compile unit for codeEric Christopher2014-02-271-4/+6
| | | | | | | generation purposes. Paired with a commit to llvm. llvm-svn: 202334
* 80-col and bad line ending fixups.Eric Christopher2014-02-261-8/+8
| | | | llvm-svn: 202219
* Address review comments for r202185, no functionality changes.Adrian Prantl2014-02-251-2/+3
| | | | llvm-svn: 202208
* Debug info: Generate debug info for variadic functions.Adrian Prantl2014-02-251-0/+16
| | | | | | | | Paired commit with LLVM. rdar://problem/13690847 llvm-svn: 202185
* DebugInfo: Avoid unnecessarily looking up the context when the declaration ↵David Blaikie2014-02-181-3/+2
| | | | | | | | is already built. No functional change intended. llvm-svn: 201602
* Debug info: fix a crasher when when emitting debug info forAdrian Prantl2014-02-041-3/+4
| | | | | | | | not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 llvm-svn: 200797
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-251-2/+2
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* Debug info: use the file a typedef is defined in as its decl_file insteadAdrian Prantl2014-01-211-2/+4
| | | | | | | | | of the current compilation unit. As a side effect this enables many more LTO uniquing opportunities. This reapplies r199757 with a better testcase. llvm-svn: 199760
* revert 199757 for buildbot breakage.Adrian Prantl2014-01-211-4/+2
| | | | llvm-svn: 199758
* Debug info: use the file a typedef is defined in as its decl_file insteadAdrian Prantl2014-01-211-2/+4
| | | | | | | | | of the current compilation unit. As a side effect this enables many more LTO uniquing opportunities. rdar://problem/15851206 llvm-svn: 199757
* Rename FunctionProtoType accessors from 'arguments' to 'parameters'Alp Toker2014-01-201-2/+2
| | | | | | | | | | | | | | | | | Fix a perennial source of confusion in the clang type system: Declarations and function prototypes have parameters to which arguments are supplied, so calling these 'arguments' was a stretch even in C mode, let alone C++ where default arguments, templates and overloading make the distinction important to get right. Readability win across the board, especially in the casting, ADL and overloading implementations which make a lot more sense at a glance now. Will keep an eye on the builders and update dependent projects shortly. No functional change. llvm-svn: 199686
* Debug info: Refactor NoLocation and ArtificialLocation to use a common baseAdrian Prantl2014-01-171-13/+16
| | | | | | | | | class and use it pervasively to restore debug locations. Fixes an interaction between cleanup and EH that caused the location to not be restored properly after emitting a landing pad. rdar://problem/15208190 llvm-svn: 199444
* Revert "Debug info: Ensure that the last stop point in a function is still ↵Adrian Prantl2014-01-071-3/+2
| | | | | | | | within" This reverts commit r198461. llvm-svn: 198714
* Revert "Debug info: Implement a cleaner version of r198461. For symmetry with"Adrian Prantl2014-01-071-2/+3
| | | | | | This reverts commit 198699 so we can get a cleaner patch. llvm-svn: 198713
* Debug info: Implement a cleaner version of r198461. For symmetry withAdrian Prantl2014-01-071-3/+2
| | | | | | | | | C and C++ don't emit an extra lexical scope for the compound statement that is the body of an Objective-C method. rdar://problem/15010825 llvm-svn: 198699
* update comment.Adrian Prantl2014-01-071-1/+1
| | | | llvm-svn: 198670
* Implement a new -fstandalone-debug option. rdar://problem/15685848Adrian Prantl2014-01-071-6/+6
| | | | | | | | | | | | | | It controls everything that -flimit-debug-info used to, plus the vtable type optimization. The old -fno-limit-debug-info option is now an alias to -fstandalone-debug and vice versa. Standalone is the default on Darwin until dtrace is updated to work with non-standalone debug info (rdar://problem/15758808). Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind because NoStandaloneDebugInfo sounded even more confusing. llvm-svn: 198655
* Debug info: Ensure that the last stop point in a function is still withinAdrian Prantl2014-01-031-2/+3
| | | | | | | | | the lexical block formed by the compound statement that is the function body. rdar://problem/15010825 llvm-svn: 198461
* remove dead code.Adrian Prantl2013-12-231-1/+1
| | | | llvm-svn: 197916
* DebugInfo: Do not include implicit members (implicit special members, ↵David Blaikie2013-12-201-2/+0
| | | | | | | | | | | | | | template instantiations, etc) in the list of members of a structure. These members will still be lazily added to the relevant DWARF DIEs in LLVM but when enumerating the members they will not appear. This allows DWARF type units to be more consistent - the type unit will never contain these special members (so all instances of the type should have the same DIEs without some having some special members and others having others) and the special members will be added to the skeletal declaration that appears in the relevant compile_unit. llvm-svn: 197844
* Debug info: (Bugfix) emit CRV qualifiers for pointers to member functions.Adrian Prantl2013-12-191-4/+6
| | | | | | rdar://problem/15678916. llvm-svn: 197641
* Debug info: Implement (rvalue) reference qualifiers for C++11 non-staticAdrian Prantl2013-12-181-2/+12
| | | | | | | | member functions. Paired commit with LLVM. rdar://problem/15356637 llvm-svn: 197612
* Correct hyphenations in comments and assert messagesAlp Toker2013-12-051-1/+1
| | | | | | | This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities in nearby lines. llvm-svn: 196466
OpenPOWER on IntegriCloud