summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Update clang for DIBuilder::createSubroutineType API change.Eric Christopher2015-10-151-7/+6
| | | | | | Patch by Amaury Sechet! llvm-svn: 250373
* Support Debug Info path remappingSaleem Abdulrasool2015-10-121-8/+20
| | | | | | | | | | | | | | | | Add support for the `-fdebug-prefix-map=` option as in GCC. The syntax is `-fdebug-prefix-map=OLD=NEW`. When compiling files from a path beginning with OLD, change the debug info to indicate the path as start with NEW. This is particularly helpful if you are preprocessing in one path and compiling in another (e.g. for a build cluster with distcc). Note that the linearity of the implementation is not as terrible as it may seem. This is normally done once per file with an expectation that the map will be small (1-2) entries, making this roughly linear in the number of input paths. Addresses PR24619. llvm-svn: 250094
* Module Debugging: Emit (ObjC) function declarations in the module scopeAdrian Prantl2015-10-041-1/+1
| | | | | | when building a module. llvm-svn: 249282
* Module debugging: Don't emit forward declarations in module scopes.Adrian Prantl2015-10-021-0/+3
| | | | | | A forward declaration inside a module header does not belong to the module. llvm-svn: 249157
* Remove unused variable.Adrian Prantl2015-10-021-1/+0
| | | | llvm-svn: 249155
* Module debugging: Also emit Objective-C interfaces forward declarationsAdrian Prantl2015-10-011-2/+3
| | | | | | in their module scope when building a clang module. llvm-svn: 249031
* Module debugging: Emit Objective-C interfaces in their module scope whenAdrian Prantl2015-10-011-2/+3
| | | | | | building a clang module. llvm-svn: 248974
* CGDebugInfo: Don't reuse a reference into a DenseMap if the DenseMap mayAdrian Prantl2015-09-291-4/+4
| | | | | | be modified in between. (NFC) llvm-svn: 248826
* Module Debugging: Emit submodules as nested DW_TAG_modules.Adrian Prantl2015-09-241-5/+10
| | | | llvm-svn: 248511
* Debug Info: Use the module pointer as key for the module cache.Adrian Prantl2015-09-241-5/+9
| | | | | | This way we don't need to rebuild the full module name for every decl. llvm-svn: 248510
* Refactor ASTSourceDescriptor to not store copies of all strings. (NFC)Adrian Prantl2015-09-241-6/+7
| | | | llvm-svn: 248509
* Module Debugging: Use the clang module signature as the module's dwo_idAdrian Prantl2015-09-221-0/+6
| | | | | | | | | | | 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
* Debug Info: When building a module, emit skeleton CUs for imported modules.Adrian Prantl2015-09-211-9/+8
| | | | llvm-svn: 248184
* Module debugging: Support submodules in the PCM/PCH debug info.Adrian Prantl2015-09-201-10/+28
| | | | llvm-svn: 248127
* Further simplify CGDebugInfo::getOrCreateModuleRef().Adrian Prantl2015-09-191-10/+8
| | | | | | DIBuilder ignoers DICompileUnits that are passed in as scopes anyway. llvm-svn: 248077
* 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
OpenPOWER on IntegriCloud