summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename ASTSourceDescriptor::ModuleName to FullModuleName for clarity.Adrian Prantl2015-09-191-7/+7
| | | | llvm-svn: 248070
* Refactor ASTReader::getSourceDescriptor(const Module &) into a constructorAdrian Prantl2015-09-191-2/+1
| | | | | | | | of ASTSourceDescriptor. It was effectively a static function. NFC. llvm-svn: 248069
* CGDebugInfo: Make creating a skeleton CU in getOrCreateModuleRef optional.Adrian Prantl2015-09-181-14/+21
| | | | | | | | | We don't want a skeleton CU when generating debug info for the module itself. NFC. llvm-svn: 248062
* Debug Info: Use the full module name as a key when caching DIModules.Adrian Prantl2015-09-181-1/+1
| | | | | | | | | | | The signature may not have been computed at the time the module reference is generated (e.g.: in the future while emitting debug info for a clang module). Using the full module name is safe because each clang module may only have a single definition. NFC. llvm-svn: 248037
* [OpenCL] Add new types for OpenCL 2.0.Alexey Bader2015-09-151-0/+26
| | | | | | | | Patch by Pedro Ferreira. Reviewers: pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D12855 llvm-svn: 247676
* Remove an unnecessary check. NFCAdrian Prantl2015-09-111-1/+1
| | | | llvm-svn: 247448
* Remove a redundant check from CGDebugInfo::shouldOmitDefinition() (NFC).Adrian Prantl2015-09-111-7/+1
| | | | llvm-svn: 247447
* Cleanup: Get rid of a bunch of unnecessary invocations of internString()Adrian Prantl2015-09-111-21/+14
| | | | | | in CGDebugInfo.cpp: MDString::get() copies its arguments. llvm-svn: 247445
* Module Debugging: Emit forward declarations for types that are defined inAdrian Prantl2015-09-111-12/+56
| | | | | | | | | clang modules, if -dwarf-ext-refs (DebugTypesExtRefs) is specified. This reimplements r247369 in about a third of the amount of code. Thanks to David Blaikie pointing this out in post-commit review! llvm-svn: 247432
* Revert "Module Debugging: Emit forward declarations for types that are ↵Adrian Prantl2015-09-111-144/+10
| | | | | | | | defined in" This reverts commit r247369 to facilitate reviewing of the following patch. llvm-svn: 247431
* Module Debugging: Emit forward declarations for types that are defined inAdrian Prantl2015-09-111-10/+144
| | | | | | clang modules, if -dwarf-ext-refs (DebugTypesExtRefs) is specified. llvm-svn: 247369
* Cleanup: Let CGDebugInfo::ModuleRefCache use a TrackingMDNode (NFC).Adrian Prantl2015-09-111-6/+6
| | | | llvm-svn: 247368
* [MS ABI] Make member pointers return true for isIncompleteTypeDavid Majnemer2015-09-101-3/+2
| | | | | | | The type of a member pointer is incomplete if it has no inheritance model. This lets us reuse more general logic already embedded in clang. llvm-svn: 247346
* Add a getDeclContextDescriptor() helper function to CGDebugInfo. (NFC)Adrian Prantl2015-09-101-25/+23
| | | | llvm-svn: 247319
* Remove unneeded #include.Adrian Prantl2015-09-081-1/+0
| | | | llvm-svn: 247081
* Module Debugging: Emit debug type information into clang ObjC modules.Adrian Prantl2015-09-081-3/+52
| | | | | | | | | | 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 Objective-C types and methods. llvm-svn: 247068
* CGDebugInfo: Instead of uniquing RetainedTypes, just refrain from retainingAdrian Prantl2015-08-271-6/+7
| | | | | | them more than once. (NFC) llvm-svn: 246231
* CGDebugInfo: Factor out a getOrCreateStandaloneType() method.Adrian Prantl2015-08-271-3/+15
| | | | | | | | | | | Usually debug info is created on the fly while during codegen. With this API it becomes possible to create standalone debug info for types that are not referenced by any code, such as emitting debug info for a clang module or for implementing something like -gfull. Because on-the-fly debug info generation may still insert retained types on top of them, all RetainedTypes are uniqued in CGDebugInfo::finalize(). llvm-svn: 246210
* Add a -gmodules option to the driver and a -dwarf-ext-refs to cc1Adrian Prantl2015-08-271-0/+1
| | | | | | | | | | | | | to enable the use of external type references in the debug info (a.k.a. module debugging). The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs" and passes that to cc1. All this does at the moment is set a flag codegenopts. http://reviews.llvm.org/D11958 llvm-svn: 246192
* DI: Clarify meaning of createTempFunctionFwdDecl() arg, NFCDuncan P. N. Exon Smith2015-08-261-1/+1
| | | | | | | | I stared at `false /*declaration*/` for quite some time before giving up and checking the actual function to see what it meant. Replacing with `/* isDefinition = */ false` to save myself effort later. llvm-svn: 246095
* Remove and forbid raw_svector_ostream::flush() calls.Yaron Keren2015-08-131-1/+0
| | | | | | | | | | After r244870 flush() will only compare two null pointers and return, doing nothing but wasting run time. The call is not required any more as the stream and its SmallString are always in sync. Thanks to David Blaikie for reviewing. llvm-svn: 244928
* Wdeprecated: ApplyDebugLocation is returned by value yet if it is ever ↵David Blaikie2015-08-121-23/+32
| | | | | | copied (rather than RVO'd) that would be broken, make it movable instead llvm-svn: 244838
* DI: Update for LLVM API change for local variablesDuncan P. N. Exon Smith2015-07-311-18/+23
| | | | | | | | Adjust to LLVM DIBuilder API changes in r243764, using `createAutoVariable()` and `createParameterVariable()` in place of `createLocalVariable()`. No real functionality change here. llvm-svn: 243765
* DI: Make getOrCreateLimitedType() return DICompositeType, NFCDuncan P. N. Exon Smith2015-07-241-6/+4
| | | | | | | | | Change `getOrCreateLimitedType()` to return a `DICompositeType` and remove the casts from its callers. Inside, I've strengthened a `cast` from `DICompositeTypeBase`, but the casts in the callers already prove that this is safe. There should be no functionality change here. llvm-svn: 243155
* DI: Make StaticDataMemberCache type-safe, NFCDuncan P. N. Exon Smith2015-07-241-2/+2
| | | | | | | Change `StaticDataMemberCache` to store references to `DIDerivedType` directly, and remove now-unnecessary casts from the accessors. llvm-svn: 243129
* Cleanup the doxygen comments in CGDebugInfo.cpp according to the codingAdrian Prantl2015-07-081-95/+1
| | | | | | | standards. Remove several hilariously out-of-date and redundant comments and move the non-redundant ones into the header file. llvm-svn: 241733
* Debug info: Emit distinct __block_literal_generic types for blocks withAdrian Prantl2015-07-071-6/+6
| | | | | | | | | | different function signatures. (Previously clang would emit all block pointer types with the type of the first block pointer in the compile unit.) rdar://problem/21602473 llvm-svn: 241534
* Debug info: Don't emit a bogus location for the global block pointer typeAdrian Prantl2015-07-061-4/+4
| | | | | | | | | | | (__block_literal_generic). The arbitrary nature of the location confuses lldb and prevents type uniquing. rdar://problem/21602473 llvm-svn: 241511
* Revert "[DebugInfo] Fix debug info generation for function static variables, ↵David Blaikie2015-07-011-31/+5
| | | | | | | | | | typedefs, and records" Caused PR24008. This reverts commit r241154. llvm-svn: 241177
* [DebugInfo] Fix debug info generation for function static variables, ↵Michael Kuperstein2015-07-011-5/+31
| | | | | | | | | | | | | | | typedefs, and records Function static variables, typedefs and records (class, struct or union) declared inside a lexical scope were associated with the function as their parent scope, rather than the lexical scope they are defined or declared in. This fixes PR19238 Patch by: amjad.aboud@intel.com Differential Revision: http://reviews.llvm.org/D9760 llvm-svn: 241154
* Use an early exit to improve readability. (NFC)Adrian Prantl2015-06-301-34/+32
| | | | llvm-svn: 241088
* Debug Info: Emit debug info for @import declarations.Adrian Prantl2015-06-301-0/+54
| | | | | | | | | This allows a module-aware debugger such as LLDB to import the currently visible modules before dropping into the expression evaluator. rdar://problem/20965932 llvm-svn: 241084
* Omit 'nodebug' methods from the class description.Paul Robinson2015-06-251-1/+2
| | | | llvm-svn: 240664
* [CodeGen] Rename EmitMemberPointer to EmitMemberFunctionPointerDavid Majnemer2015-06-231-1/+1
| | | | llvm-svn: 240382
* Debug Info: Turn on ODR type uniquing for (the C++ part of) Objective-C++.Adrian Prantl2015-06-151-4/+15
| | | | | | rdar://problem/20571359 llvm-svn: 239781
* [MS ABI, DebugInfo] Omit the size for model-less pointers-to-membersDavid Majnemer2015-05-261-3/+5
| | | | | | | | | | | | | | The representation of a pointer-to-member in the MS ABI is governed by the layout of the relevant class or if a model has been explicitly specified. If no model is specified, then an appropriate "worst-case-scenario" model is implicitly chosen if, and only, if the pointer-to-member type's representation was needed. Debug info cannot force a pointer-to-member type to have a representation so do not try to query the size of such a type unless we know it is safe to do so. llvm-svn: 238259
* Debug info: Adapt to new DIBuilder interface.Adrian Prantl2015-05-211-0/+1
| | | | llvm-svn: 237948
* Debug Info: Represent local anonymous unions as anonymous unionsAdrian Prantl2015-04-291-2/+9
| | | | | | | | | | | | | | | | and as artificial local variables in the debug info. This is a follow-up to r236059. We can't get rid of the local variables entirely because the gdb buildbot depends on them, but we can mark them as artificial while still emitting the correct debug info. As I learned from review comments other compilers also follow this model. A paired commit in LLVM temporarily relaxes the debug info verifier to not check the integrity of DW_OP_bit_pieces of artificial variables. rdar://problem/20730771 llvm-svn: 236125
* DebugInfo: Metadata constructs now start with DI*Duncan P. N. Exon Smith2015-04-291-290/+289
| | | | | | | | | | 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
* Revert "Debug Info: Represent local anonymous unions as anonymous unions"Adrian Prantl2015-04-291-0/+25
| | | | | | This reverts commit r236059 as it breaks the gdb buildbot. llvm-svn: 236110
* Debug Info: Represent local anonymous unions as anonymous unionsAdrian Prantl2015-04-281-25/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the debug info. This patch deletes a hack that emits the members of local anonymous unions as local variables. Besides being morally wrong, the existing representation using local variables breaks internal assumptions about the local variables' storage size. Compiling ``` void fn1() { union { int i; char c; }; i = c; } ``` with -g -O3 -verify will cause the verifier to fail after SROA splits the 32-bit storage for the "local variable" c into two pieces because the second piece is clearly outside the 8-bit range that is expected for a variable of type char. Given the choice I'd rather fix the debug representation than weaken the verifier. Debuggers generally already know how to deal with anonymous unions when they are members of C++ record types, but they may have problems finding the local anonymous struct members in the expression evaluator. rdar://problem/20730771 llvm-svn: 236059
* Replace getPointeeType()->isFunctionType with isMemberDataPointerTypeDavid Majnemer2015-04-241-1/+1
| | | | llvm-svn: 235682
* DebugInfo: Prepare for removal of DIArray and DITypeArray typedefsDuncan P. N. Exon Smith2015-04-211-31/+36
| | | | | | | | An upcoming LLVM commit will remove the `DIArray` and `DITypeArray` typedefs that shadow `DebugNodeArray` and `MDTypeRefArray`, respectively. Use those types directly. llvm-svn: 235412
* DebugInfo: Prepare for deletion of DIDescriptor subclassesDuncan P. N. Exon Smith2015-04-211-54/+41
| | | | | | | An upcoming LLVM commit will delete all the remaining subclasses of (the already deleted) `DIDescriptor`. Stop using them. llvm-svn: 235403
* DebugInfo: Prepare for deletion of subclasses of DIScopeDuncan P. N. Exon Smith2015-04-201-79/+80
| | | | | | | | Prepare for the deletion in LLVM of the subclasses of (the already deleted) `DIScope` by using the raw pointers they were wrapping directly. llvm-svn: 235355
* DebugInfo: Prepare for deletion of subclasses of DITypeDuncan P. N. Exon Smith2015-04-201-16/+14
| | | | | | | | | | | Subclasses of (the already deleted) `DIType` will be deleted by an upcoming LLVM commit. Remove references. While `DICompositeType` wraps `MDCompositeTypeBase` and `DIDerivedType` wraps `MDDerivedTypeBase`, most uses of each really meant the more specific `MDCompositeType` and `MDDerivedType`. I updated accordingly. llvm-svn: 235350
* DebugInfo: Prepare for deletion of DITypeDuncan P. N. Exon Smith2015-04-201-174/+159
| | | | | | | `DIType` is going to be deleted by an upcoming LLVM commit, so replace uses with `MDType*`. llvm-svn: 235330
* DebugInfo: Prepare for deletion of DIScopeDuncan P. N. Exon Smith2015-04-201-7/+7
| | | | | | | An upcoming LLVM commit will delete `DIScope`, so update users to `MDScope*`. llvm-svn: 235326
* DebugInfo: Prepare for deletion of DIDescriptorDuncan P. N. Exon Smith2015-04-181-22/+13
| | | | | | Prepare for upcoming LLVM change to delete `DIDescriptor`. llvm-svn: 235245
* DebugInfo: Update for LLVM API change in DIBuilder (r235111)Duncan P. N. Exon Smith2015-04-161-91/+75
| | | | | | | | | | | | | | | | | LLVM r235111 changed the `DIBuilder` API to stop using `DIDescriptor` and its subclasses. Rolled into this was some tightening up of types: - Scopes: `DIDescriptor` => `MDScope*`. - Generic debug nodes: `DIDescriptor` => `DebugNode*`. - Subroutine types: `DICompositeType` => `MDSubroutineType*`. - Composite types: `DICompositeType` => `MDCompositeType*`. Note that `DIDescriptor` wraps `MDNode`, and `DICompositeType` wraps `MDCompositeTypeBase`. It's this new type strictness that requires changes here. llvm-svn: 235112
OpenPOWER on IntegriCloud