summaryrefslogtreecommitdiff
path: root/clang/test/Modules/ModuleDebugInfo.cpp
AgeCommit message (Collapse)Author
2023-09-12Propagate the DWARF version from the main compiler invocation to PCHC… ↵Adrian Prantl
(#66032) …ontainerGenerator Currently it remains uninitialized and thus always uses the LLVM default of 4.
2022-12-12[ZOS] Convert tests to check 'target={{.*}}-zos{{.*}}'Paul Robinson
Also add 'system-zos' as a lit feature and use it where needed. Part of the project to eliminate special handling for triples in lit expressions. Differential Revision: https://reviews.llvm.org/D139444
2022-12-02[lit][AIX] Convert clang tests to use 'target={{.*}}-aix{{.*}}'Paul Robinson
Part of the project to eliminate special handling for triples in lit expressions. Differential Revision: https://reviews.llvm.org/D137437
2022-01-10Emit the C++ dialect in -gmodules .pcm files.Adrian Prantl
Because of commit: https://reviews.llvm.org/D104291 the -gmodules .pcm files do not have the same DW_AT_language dialect as the .o file. This was a simple matter of passing the DebugStrictDwarf flag to the PCHContainerGenerator object's CodeGenOpts from the CompilerInstance passed in to it. Before this change if you ran dwarfdump on the gmodule cache folder you would get DW_AT_language (DW_LANG_C_plus_plus) even when using -std=c++14 with clang Patch by Shubham Rastogi! Differential Revision: https://reviews.llvm.org/D116790
2021-10-25[AIX][ZOS] Disable tests due to lack of Objective-C supportJake Egan
AIX and z/OS lack Objective-C support, so mark these tests as unsupported for AIX and z/OS. This patch follows the same reasoning as D109060. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D112390
2021-04-12Reland [DebugInfo] Fix the mismatching between C++ language tags and Dwarf ↵Esme-Yi
versions."" This reverts commit c965e14a12955355ead9ea093989a8fcbf03a8c1.
2021-04-12Revert "[DebugInfo] Fix the mismatching between C++ language tags and Dwarf ↵Esme-Yi
versions." This reverts commit 62fa9b9388aa114e3b1a58bbdbcd966ae3492ba5.
2021-04-12[DebugInfo] Fix the mismatching between C++ language tags and Dwarf versions.Esme-Yi
Summary: The tags DW_LANG_C_plus_plus_14 and DW_LANG_C_plus_plus_11, introduced in Dwarf-5, are unexpected in previous versions. Fixing the mismathing doesn't have any drawbacks for any other debuggers, but helps dbx. Reviewed By: aprantl, shchenz Differential Revision: https://reviews.llvm.org/D99250
2020-06-01[DebugInfo][CallSites] Remove decl subprograms from 'retainedTypes:'Djordje Todorovic
After the D70350, the retainedTypes: isn't being used for the purpose of call site debug info for extern calls, so it is safe to delete it from IR representation. We are also adding a test to ensure the subprogram isn't stored within the retainedTypes: from corresponding DICompileUnit. Differential Revision: https://reviews.llvm.org/D80369
2020-05-28[DebugInfo] Use SplitTemplateClosers (foo<bar<baz> >) in DWARF tooSam McCall
Summary: D76801 caused some regressions in debuginfo compatibility by changing how certain functions were named. For CodeView we try to mirror MSVC exactly: this was fixed in a549c0d00486 For DWARF the situation is murkier. Per David Blaikie: > In general DWARF doesn't specify this at all. > [...] > This isn't the only naming divergence between GCC and Clang Nevertheless, including the space seems to provide better compatibility with GCC and GDB. E.g. cpexprs.cc in the GDB testsuite requires this formatting. And there was no particular desire to change the printing of names in debug info in the first place (just in diagnostics and other more user-facing text). Fixes PR46052 Reviewers: dblaikie, labath Subscribers: aprantl, cfe-commits, dyung Tags: #clang Differential Revision: https://reviews.llvm.org/D80554
2020-04-07Slightly modify some tests as follow up to bcf66084, which breaks tests.Amy Huang
The change in bcf6604 added a debug info flag, which caused some tests to fail; I removed some commas so that the test matching still works.
2020-03-26[AST] Print a<b<c>> without extra spaces in C++11 or later.Sam McCall
Summary: It's not 1998 anymore. Reviewers: kadircet Subscribers: jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76801
2019-09-24Support for DWARF-5 C++ language tags.Adrian Prantl
This patch provides support for DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend. Patch by Sourabh Singh Tomar! Differential Revision: https://reviews.llvm.org/D67613 Reapplies r372663 after adapting a failing test in the LLDB testsuite. llvm-svn: 372681
2019-09-23Revert "Support for DWARF-5 C++ language tags."Jonas Devlieghere
This reverts commit bf9c8ffb54943c6d77398adbedddf05ef9724007. llvm-svn: 372672
2019-09-23Support for DWARF-5 C++ language tags.Adrian Prantl
This patch provides support for DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend. Patch by Sourabh Singh Tomar! Differential Revision: https://reviews.llvm.org/D67613 llvm-svn: 372663
2019-04-25Skip type units/type uniquing when we know we're only emitting the type once ↵David Blaikie
(vtable-based emission when triggered by a strong vtable, with -fno-standalone-debug) (this would regress size without a corresponding LLVM change that avoids putting other user defined types inside type units when they aren't in their own type units - instead emitting declarations inside the type unit and a definition in the primary CU) Reviewers: aprantl Differential Revision: https://reviews.llvm.org/D61079 llvm-svn: 359235
2018-02-12Re-commit r324490: [DebugInfo] Improvements to representation of enumeration ↵Momchil Velikov
types (PR36168) Differential revision: https://reviews.llvm.org/D42736 llvm-svn: 324900
2018-02-07Revert [DebugInfo] Improvements to representation of enumeration types ↵Momchil Velikov
(PR36168)" Revert due to breaking buildbots (LLDB tests) llvm-svn: 324508
2018-02-07[DebugInfo] Improvements to representation of enumeration types (PR36168)Momchil Velikov
This patch: * fixes an incorrect sign-extension of unsigned values, when emitting debug info metadata for enumerators * the enumerators metadata is created with a flag, which determines interpretation of the value bits (signed or unsigned) * the enumerations metadata contains the underlying integer type and a flag, indicating whether this is a C++ "fixed enum" Differential Revision: https://reviews.llvm.org/D42736 llvm-svn: 324490
2018-01-03-gmodules: Emit debug info for implicit module imports via #include.Adrian Prantl
When a type is only used as a template parameter and that type is the only type imported from another #include'd module, no skeleton CU for that module is generated, so a consumer doesn't know where to find the type definition. By emitting an import declaration, we can force a skeleton CU to be generated for each imported module. rdar://problem/36266156 llvm-svn: 321754
2017-07-24Debug Info: Avoid completing class types when a definition is in a module.Adrian Prantl
This patch adds an early exit to CGDebugInfo::completeClassData() when compiling with -gmodules and the to-be-completed type is available in a clang module. rdar://problem/23599990 llvm-svn: 308938
2016-10-20Remove 24 instances of 'REQUIRES: shell'Reid Kleckner
Tests fall into one of the following categories: - The requirement was unnecessary - Additional quoting was required for backslashes in paths (see "sed -e 's/\\/\\\\/g'") in the sanitizer tests. - OpenMP used 'REQUIRES: shell' as a proxy for the test failing on Windows. Those tests fail there reliably, so use XFAIL instead. I tried not to remove shell requirements that were added to suppress flaky test failures, but if I screwed up, we can add it back as needed. llvm-svn: 284793
2016-08-17Module debug info: Fix a bug in handling record decls without fields.Adrian Prantl
The previous condition would erroneously mark all CXXRecordDecls that didn't have any fields as being defined in a clang module. This patch fixes the condition to only apply to explicit template instantiations. <rdar://problem/27771823> llvm-svn: 278952
2016-07-21Reroll "Include unreferenced nested types in member list only for CodeView"Adrian McCarthy
Another attempt at r276271, hopefully without breaking ModuleDebugInfo test. llvm-svn: 276317
2016-07-21Revert "Include unreferenced nested types in member list only for CodeView"Adrian McCarthy
Patch broke ModuleDebugInfo test on the build bots (but not locally). Again. svn revision: r276271 This reverts commit 9da8a1b05362bc96f2855fb32b5588b89407685d. llvm-svn: 276279
2016-07-21Include unreferenced nested types in member list only for CodeViewAdrian McCarthy
Unreferenced nested structs and classes were omitted from the debug info. In DWARF, this was intentional, to avoid bloat. But for CodeView, we want this information to be consistent with what Microsoft tools would produce and expect. llvm-svn: 276271
2016-04-26Module debugging: Also correctly handle typedef'd foward-declared members.Adrian Prantl
Thanks again to Richard Smith for pointing this out. llvm-svn: 267630
2016-04-25Module Debugging: Fix the condition for determining whether a templateAdrian Prantl
instantiation is in a module. This patch fixes the condition for determining whether the debug info for a template instantiation will exist in an imported clang module by: - checking whether the ClassTemplateSpecializationDecl is complete and - checking that the instantiation was in a module by looking at the first field. I also added a negative check to make sure that a typedef to a forward-declared template (with the definition outside of the module) is handled correctly. http://reviews.llvm.org/D19443 rdar://problem/25553724 llvm-svn: 267464
2016-04-23DebugInfo: Adapt to loss of DITypeRef in LLVM r267296Duncan P. N. Exon Smith
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
2016-04-15Update to match LLVM changes for PR27284.Adrian Prantl
(Reverse the ownership between DICompileUnit and DISubprogram.) http://reviews.llvm.org/D19034 <rdar://problem/25256815> llvm-svn: 266445
2016-03-07Module Debugging: Fix a crash when emitting debug info for nested tag typesAdrian Prantl
whose DeclContext is not yet complete by deferring their emission. rdar://problem/24918680 llvm-svn: 262851
2016-02-10Remove some unnecessary CHECK-SAMEs in ModuleDebugInfo.{cpp,m}.Justin Lebar
Suggested by Paul Robinson. llvm-svn: 260346
2016-02-10Get rid of CHECK-SAME-NOT in tests.Justin Lebar
Summary: This isn't a FileCheck directive; it does nothing. Reviewers: jroelofs Subscribers: cfe-commits, majnemer Differential Revision: http://reviews.llvm.org/D17051 llvm-svn: 260334
2016-01-22Module Debugging: Use a nonzero DWO id for precompiled headers.Adrian Prantl
PCH files don't have a module signature and LLVM uses a nonzero DWO id as an indicator for skeleton / module CUs. This change pins the DWO id for PCH files to a known constant value. The correct long-term solution here is to implement a module signature that is an actual dterministic hash (at the moment module signatures are just random nonzero numbers) and then enable this for PCH files as well. <rdar://problem/24290667> llvm-svn: 258507
2016-01-20Module Debugging: Fine-tune the condition that determines whether a typeAdrian Prantl
can be found in a module. There are externally visible anonymous types that can be found: typedef struct { } s; // I can be found via the typedef. There are anonymous internal types that can be found: namespace { struct s {}; } // I can be found by name. rdar://problem/24199640 llvm-svn: 258272
2016-01-19Module Debugging: Make sure that anonymous tag decls that define globalAdrian Prantl
variables are visited. This shouldn't encourage anyone to put global variables into clang modules. rdar://problem/24199640 llvm-svn: 258250
2016-01-19Module Debugging: Defer the emission of anonymous tag declsAdrian Prantl
until we are visiting their declcontext. This fixes a regression introduced in r256962: When building debug info for a typdef'd anonymous tag type, we would be visiting the inner anonymous type first thus creating a "typedef changes linkage of anonymous type, but linkage was already computed" error. rdar://problem/24199640 llvm-svn: 258152
2016-01-09Module debugging: Add a testcase for standalone forward declarations.Adrian Prantl
llvm-svn: 257241
2016-01-06Module debugging: Defer emitting tag types until their definitionAdrian Prantl
was visited and all decls have been merged. We only get a single chance to emit the types for virtual classes because CGDebugInfo::completeRequiredType() categorically doesn't complete them. llvm-svn: 256962
2016-01-05Fix a typo in testcase and increase its coverage!Adrian Prantl
llvm-svn: 256874
2015-10-08Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman
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
2015-09-22Module Debugging: Use the clang module signature as the module's dwo_idAdrian Prantl
when building a module. Clang already records the module signature when building a skeleton CU to reference a clang module. Matching the id in the skeleton with the one in the module allows a DWARF consumer to verify that they found the correct version of the module without them needing to know about the clang module format. llvm-svn: 248345
2015-09-10Debug Info: Remove an unnecessary debug type visitor.Adrian Prantl
Thanks to dblaikie for spotting this. llvm-svn: 247303
2015-09-08clang/test/Modules/ModuleDebugInfo.cpp: Add -triple %itanium to appease ↵NAKAMURA Takumi
ms-targeted builds. I think DebugInfo tests may avoid MS stuff for now. llvm-svn: 247093
2015-09-08Module Debugging: Emit debug type information into clang modules.Adrian Prantl
When -fmodule-format is set to "obj", emit debug info for all types declared in a module or referenced by a declaration into the module's object file container. This patch adds support for C and C++ types. llvm-svn: 247049