summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info-namespace.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update for LLVM IR metadata changes (DIImportedEntity now needs a DIFile).Adrian Prantl2017-07-191-4/+4
| | | | | | | | | <rdar://problem/33357889> https://bugs.llvm.org/show_bug.cgi?id=33822 Differential Revision: https://reviews.llvm.org/D35583 llvm-svn: 308399
* Fix scope of namespaced DISubprograms when the function definition is ↵Adrian Prantl2017-05-161-0/+6
| | | | | | | | | | | | | | out-of-line. This fixes a regression introduced in r302915. Using the lexical decl context is not necessary here for what r302915 wast trying to achieve. Not canonicalizing the NamespaceDecl in getOrCreateNamespace is suficient. rdar://problem/29339538 llvm-svn: 303222
* Relax testcase to fix a PS4 buildbot failure.Adrian Prantl2017-05-011-1/+1
| | | | llvm-svn: 301805
* Adapt to LLVM API change (DINamespace no longer takes line/file info).Adrian Prantl2017-04-281-7/+13
| | | | | | | rdar://problem/17484998 https://reviews.llvm.org/D32648 llvm-svn: 301707
* Add debug info support for C++11 inline namespaces.Adrian Prantl2016-11-031-4/+9
| | | | | | <rdar://problem/18616046> llvm-svn: 285960
* Update Clang for D20147 ("DebugInfo: New metadata representation for global ↵Peter Collingbourne2016-09-131-2/+2
| | | | | | | | variables.") Differential Revision: http://reviews.llvm.org/D20415 llvm-svn: 281285
* Port some more debug info tests on WindowsReid Kleckner2016-06-301-3/+1
| | | | llvm-svn: 274245
* DebugInfo: DIGlobalVariables became 'distinct' in LLVM r267301Duncan P. N. Exon Smith2016-04-231-4/+4
| | | | | | Update testcases due to DIBuilder change. llvm-svn: 267302
* DebugInfo: Adapt to loss of DITypeRef in LLVM r267296Duncan P. N. Exon Smith2016-04-231-16/+16
| | | | | | | | | | | | | LLVM stopped using MDString-based type references, and DIBuilder no longer fills 'retainedTypes:' with every DICompositeType that has an 'identifier:' field. There are just minor changes to keep the same behaviour in CFE. Leaving 'retainedTypes:' unfilled has a dramatic impact on the output order of the IR though. There are a huge number of testcase changes, which were unfortunately not really scriptable. llvm-svn: 267297
* Update to match LLVM changes for PR27284.Adrian Prantl2016-04-151-6/+8
| | | | | | | | | (Reverse the ownership between DICompileUnit and DISubprogram.) http://reviews.llvm.org/D19034 <rdar://problem/25256815> llvm-svn: 266445
* Adapt to LLVM API change in r265077.Adrian Prantl2016-03-311-1/+1
| | | | | | | | | EmissionKind moved from DIBuilder to DICompileUnit. <rdar://problem/25427165> llvm-svn: 265078
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-3/+3
| | | | | | | | | | | | | | | | With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 llvm-svn: 249655
* DI: Update DISubprogram testcases after LLVM r246098Duncan P. N. Exon Smith2015-08-261-3/+3
| | | | llvm-svn: 246099
* Erase REQUIRES: shell-preserves-root from remaining tests, see r242312.þYaron Keren2015-07-151-1/+0
| | | | llvm-svn: 242323
* Update testcase to reflect new behavior in DIBuilder.Adrian Prantl2015-07-061-2/+1
| | | | llvm-svn: 241471
* Update testcases: DICompileUnits are now created distinct by DIBuilder.Adrian Prantl2015-06-301-2/+2
| | | | llvm-svn: 241098
* DebugInfo: Metadata constructs now start with DI*Duncan P. N. Exon Smith2015-04-291-36/+36
| | | | | | | | | | LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now that the `DIDescriptor` hierarchy has been gone for about a week. This commit was generated using the rename-md-di-nodes.sh upgrade script attached to PR23080, followed by running clang-format-diff.py on the `lib/` portion of the patch. llvm-svn: 236121
* Add a bunch of missing "CHECK" colons in tests. NFC.Ahmed Bougacha2015-03-141-1/+1
| | | | llvm-svn: 232237
* DebugInfo: Move new hierarchy into place (clang)Duncan P. N. Exon Smith2015-03-031-38/+52
| | | | | | | Update testcases for LLVM change in r231082 to use the new debug info hierarchy. llvm-svn: 231083
* IR: Make metadata typeless in assembly, clang sideDuncan P. N. Exon Smith2014-12-151-31/+31
| | | | | | Match LLVM changes from r224257. llvm-svn: 224259
* Fully handle globals and functions in CGDebugInfo::getDeclarationOrDefinition()Frederic Riss2014-11-181-7/+27
| | | | | | | | | | | | | | | | | | | | Currently this function would return nothing for functions or globals that haven't seen a definition yet. Make it return a forward declaration that will get RAUWed with the definition if one is seen at a later point. The strategy used to implement this is similar to what's done for types: the forward declarations are stored in a vector and post processed upon finilization to perform the required RAUWs. For now the only user of getDeclarationOrDefinition() is EmitUsingDecl(), thus this patch allows to emit correct imported declarations even in the absence of an actual definition of the imported entity. (Another user will be the debug info generation for argument default values that I need to resurect). Differential Revision: http://reviews.llvm.org/D6173 llvm-svn: 222220
* [DebugInfo] Do not record artificial global initializer functions in the ↵Frederic Riss2014-11-051-4/+4
| | | | | | | | | | | | | | | DeclCache. When we are generating the global initializer functions, we call CGDebugInfo::EmitFunctionStart() with a valid decl which is describing the initialized global variable. Do not update the DeclCache with this key as it will overwrite the the cached variable DIGlobalVariable with the newly created artificial DISubprogram. One could wonder if we should put artificial subprograms in the DIE tree at all (there are vaild uses for them carrying line information though). llvm-svn: 221385
* Remove "REQUIRES:shell" from tests. They work for me.NAKAMURA Takumi2014-11-041-2/+0
| | | | llvm-svn: 221269
* Revert "Revert "DI: LLVM schema change: fold constants into string""Duncan P. N. Exon Smith2014-10-031-21/+21
| | | | | | | | | | | | | | This reverts commit r218917, effectively reapplying r218913. Original commit message follows. -- Update debug info testcases for an LLVM metadata schema change to fold metadata constant operands into a single `MDString`. Part of PR17891. llvm-svn: 219011
* Revert "DI: LLVM schema change: fold constants into string"Duncan P. N. Exon Smith2014-10-021-21/+21
| | | | | | This reverts commit r218913 while I investigate some bots. llvm-svn: 218917
* DI: LLVM schema change: fold constants into stringDuncan P. N. Exon Smith2014-10-021-21/+21
| | | | | | | | | Update debug info testcases for an LLVM metadata schema change to fold metadata constant operands into a single `MDString`. Part of PR17891. llvm-svn: 218913
* Enable -gcolumn-info by default.Diego Novillo2014-07-101-5/+5
| | | | | | | | | | | | | | | This patch flips the default value for -gcolumn-info to be on by default. I discussed the rationale and provided compile/size data in: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/074290.html This also updates the documentation and some tests that relied on the lack of column information. Some tests had column information in the expected output, but it was wrong (the tsan tests). Others were using the driver to execute. llvm-svn: 212781
* DebugInfo: emit namespace aliases as named imported declarations instead of ↵David Blaikie2014-04-061-3/+3
| | | | | | | | named imported entities Apparently that's how DWARF4 suggests they be emitted. So let's do that. llvm-svn: 205686
* Adapt CGDebugInfo to interface changes in DIBuilder/DIImportedEntity.Adrian Prantl2014-04-011-2/+2
| | | | | | | The Decl field in a DIImportedEntity is now a DIRef. Paired commit with LLVM. llvm-svn: 205278
* Revert "Just call getContextDescriptor to get the context for subprograms"Eric Christopher2014-03-271-1/+1
| | | | | | | | 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-1/+1
| | | | | | | | 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
* Pass down the debug emission kind into the compile unit for codeEric Christopher2014-02-271-2/+2
| | | | | | | generation purposes. Paired with a commit to llvm. llvm-svn: 202334
* check-clang: Introduce the feature "dw2" to suppress ↵NAKAMURA Takumi2014-02-161-0/+1
| | | | | | | CodeGenCXX/debug-info-namespace.cpp with *-win32. FIXME: Could we add itanium triple here? llvm-svn: 201483
* DebugInfo: imported_decl/using declarations at namespace scopeDavid Blaikie2014-02-151-1/+6
| | | | llvm-svn: 201470
* DebugInfo: Fix for an improvement to DIBuilder to not emit {i32 0} for ↵David Blaikie2014-02-031-1/+1
| | | | | | zero-length arrays. llvm-svn: 200722
* Implement a new -fstandalone-debug option. rdar://problem/15685848Adrian Prantl2014-01-071-3/+3
| | | | | | | | | | | | | | 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
* clang/test/CodeGenCXX/debug-info-namespace.cpp: Suppress this also on msys, ↵NAKAMURA Takumi2013-10-261-0/+1
| | | | | | | | for now since r193116. Clang confuses among dosish paths. In this case, "Input/foo.cpp" and "Input\foo.cpp" cannot be unified. llvm-svn: 193456
* Debug Info: update testing cases when the derived-from field ofManman Ren2013-10-081-1/+1
| | | | | | | | DIDerivedType is updated to use DITypeRef. Paired commit with r192246. llvm-svn: 192247
* Revert r189649 because it was breaking sanitizer bots.Yunzhong Gao2013-08-301-12/+0
| | | | llvm-svn: 189660
* Fixing a bug where debug info for a local variable gets emitted at file scope.Yunzhong Gao2013-08-301-0/+12
| | | | | | | The patch was discussed in Phabricator. See: http://llvm-reviews.chandlerc.com/D1281 llvm-svn: 189649
* Debug Info: generate a unique identifier for C++ struct, class, union, and enum.Manman Ren2013-08-291-2/+2
| | | | | | | | | | | | | | | | We use CXX mangler to generate unique identifier for external C++ struct, union, class and enum. Types with unique identifier are added to retained types by DIBuilder. Testing cases are updated to reflect the unique identifier generated for types. The order of MDNodes is changed because of retained types and testing cases are updated accordingly. Testing case debug-info-uuid.cpp now emits error with Itanium mangler, since uuid is not yet handled in Itanium mangler. And it will check for the error message. llvm-svn: 189622
* Debug Info: this reverts commit r189600.Manman Ren2013-08-291-2/+2
| | | | | | | | We had further discussions on how to retain types, whether to do it in front end or in DIBuilder. And we agree to do it in DIBuilder so front ends generating unique identifier do not need to worry about retaining them. llvm-svn: 189609
* Debug Info: generate a unique identifier for C++ struct, class, union, and enum.Manman Ren2013-08-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | We use CXX mangler to generate unique identifier for external C++ struct, union, class and enum. Types with unique identifier are added to RetainedTypes to make sure they are treated as used even when all uses are replaced with the identifiers. A single type can be added to RetainedTypes multiple times. For example, both createForwardDecl and createLimitedType can add the same type to RetainedTypes. A set is used to avoid duplication when updating AllRetainTypes in DIBuilder. Testing cases are updated to reflect the unique identifier generated for types. The order of MDNodes is changed because of retained types and testing cases are updated accordingly. Testing case debug-info-uuid.cpp now emits error with Itanium mangler, since uuid is not yet handled in Itanium mangler. We choose to update RetainedTypes in clang, then at finalize(), we update AllRetainTypes in DIBuilder. The other choice is to update AllRetainTypes in DIBuilder when creating a DICompositeType with unique identifier. This option requires using ValueHandle for AllRetainTypes in DIBuilder since the created DICompositeType can be modified later on by setContainingType etc. llvm-svn: 189600
* DebugInfo: Canonicalize namespaces to avoid emitting multiple namespaces ↵David Blaikie2013-08-161-15/+17
| | | | | | | | | | | | with the same name but different lines Updated test case to not rely on line numbers in more cases (it's hard to use the @ check syntax for debug info test cases (due to the interesting ordering of metadata) and this case in particular (given the hash-line directive)) - left a few in there to cover the line number information for these. llvm-svn: 188585
* DebugInfo: handle the DI asm printing change to reword '[fwd]' as '[decl]' ↵David Blaikie2013-06-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | and add '[def]' for non-decl tag types This is to make test cases looking for definitions more legible by making the definition explicit rather than just the absence of '[fwd]'. This allowed the debug-info-record tests to be rephrased - and in the interests of reducing the number of individual test cases/invocations we have, I merged them into one file, separated them with namespaces (& then moved them to C++ because namespaces are great). If they need to remain 'C' only tests, they can be moved back. (I didn't group them with 'debug-info-class.cpp' because these tests only apply to -fno-limit-debug-info) I removed the pieces of code that would cause these tests to pass under -flimit-debug-info to ensure the tests remain relevant to their fixes should we ever improve -flimit-debug-info to catch that kind of code. This commit is version locked with the corresponding change to DebugInfo.h in LLVM. Except some transient buildbot fallout. llvm-svn: 184524
* Debug info: An if condition now creates a lexical scope of its own.Adrian Prantl2013-06-081-2/+3
| | | | | | | | | Two variables with the same name declared in two if conditions in the same scope are no longer coalesced into one. rdar://problem/14024005 llvm-svn: 183597
* PR14606: Debug Info for namespace aliases/DW_TAG_imported_moduleDavid Blaikie2013-05-201-11/+17
| | | | | | | | | This resolves the last of the PR14606 failures in the GDB 7.5 test suite. (but there are still unresolved issues in the imported_decl case - we need to implement optional/lazy decls for functions & variables like we already do for types) llvm-svn: 182329
* Revert "Revert "Debug Info: Using declarations/DW_TAG_imported_declaration ↵David Blaikie2013-05-201-13/+43
| | | | | | | | | | | | | | | | | | | | | of variables, types, and functions."" This reverts commit r181947 (git d2990ce56a16050cac0d7937ec9919ff54c6df62 ) This addresses one of the two issues identified in r181947, ensuring that types imported via using declarations only result in a declaration being emitted for the type, not a definition. The second issue (emitting using declarations that are unused) is hopefully an acceptable increase as the real fix for this would be a bit difficult (probably at best we could record which using directives were involved in lookups - but may not have been the result of the lookup). This also ensures that DW_TAG_imported_declarations (& directives) are not emitted in line-tables-only mode as well as ensuring that typedefs only require/emit declarations (rather than definitions) for referenced types. llvm-svn: 182231
* Revert "Debug Info: Using declarations/DW_TAG_imported_declaration of ↵David Blaikie2013-05-151-35/+11
| | | | | | | | | | | | | variables, types, and functions." This reverts commit r181393 (git 3923d6a87fe7b2c91cc4a7dbd90c4ec7e2316bcd). This seems to be emitting too much extra debug info for two (known) reasons: * full class definitions are emitted when only declarations are expected * unused using declarations still produce DW_TAG_imported_declarations llvm-svn: 181947
* PR15956: Debug Info: Include the appropriate file location in types created ↵David Blaikie2013-05-141-11/+16
| | | | | | | | | due to using declarations We might benefit from API refactoring here (why pass in a value that's derived from another parameter?) but this is the immediate issue. llvm-svn: 181747
OpenPOWER on IntegriCloud