summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* DebugInfo: Unify & optimize the lazy addition of record typesDavid Blaikie2013-08-151-14/+26
| | | | | | | | | | | | | | | Rather than going through the whole getOrCreateType machinery to manifest a type, cut straight to the implementation because we know we have to do work. While the previous implementation was sufficient for the two cases (completeness and required completeness) we have already (the general machinery could inspect the type for those attributes & go down the full definition path), a pending change (to emit info for types when we emit their vtables) won't have that luxury & we'll need to force the creation rather than relying on the general purpose routine. llvm-svn: 188486
* DebugInfo: Revert change to the return type of createRecordFwdDeclDavid Blaikie2013-08-151-5/+3
| | | | | | | It still does only return DICompositeType, but I've no need to make that change right now. llvm-svn: 188482
* DebugInfo: remove unnecessary type registrationDavid Blaikie2013-08-151-1/+0
| | | | | | This happens in the caller a few frames up anyway. llvm-svn: 188475
* DebugInfo: Don't create duplicate forward declaration metadata unnecessarily.David Blaikie2013-08-151-4/+8
| | | | | | | No functionality change, at best a slight (questionable) optimization, but necessary for correctness of future work. llvm-svn: 188474
* Drive by cleanupDavid Blaikie2013-08-131-7/+2
| | | | llvm-svn: 188251
* DebugInfo: Simplify declaration building code - relying on the limit debug ↵David Blaikie2013-08-121-17/+6
| | | | | | info checking already in CreateType(RecordType) llvm-svn: 188222
* DebugInfo: simplify some limited/declaration creation APIsDavid Blaikie2013-08-121-36/+10
| | | | llvm-svn: 188214
* Only emit debug info for implicit members that actually get codegen, not ↵David Blaikie2013-08-091-7/+10
| | | | | | | | | | | | just ODR use. This includes special members (copy/default ctor, copy assign, default ctor) and template specializations for member function templates. Good for a 5% decrease (1.80 to 1.71 GB) in size on Clang+LLVM's .dwo files (when using fission). llvm-svn: 188085
* DebugInfo: Don't prefer declarations over definitions in -flimit-debug-info in CDavid Blaikie2013-08-011-2/+3
| | | | | | | | | Without an ODR, the -flimit-debug-info debug info size optimization of emitting declarations for fully defined types when only a declaration is needed by the TU, is incorrect. Emit the full definition whenever it's available in non-C++. llvm-svn: 187611
* DebugInfo: Emit template arguments for limited types used for context.David Blaikie2013-08-011-5/+5
| | | | | | | | We emit definitions with no members when a nested type is referenced/required (GCC does the same, to be fair) but failed to attach the template arguments in such a case. llvm-svn: 187608
* Reduce a variable's scope (no functionality change)David Blaikie2013-08-011-2/+1
| | | | llvm-svn: 187594
* Debug Info: Fix an oversight of r186553. Ensure that the function prologueAdrian Prantl2013-07-241-3/+9
| | | | | | of an artificial function gets an artificial location as well. llvm-svn: 187074
* Implement a better fix for r186894 by setting the appropriate type for ↵Adrian Prantl2013-07-231-2/+3
| | | | | | | | __byref_variable_layout. rdar://problem/14386148 llvm-svn: 186898
* Debug Info: Acknowledge the alignment when locating byref block variables.Adrian Prantl2013-07-221-0/+1
| | | | | | Fixes rdar://problem/14386148 llvm-svn: 186894
* Update createCompileUnit call for llvm changes.Eric Christopher2013-07-191-5/+4
| | | | llvm-svn: 186638
* s/BuiltinLocation/ArtificialLocation/Adrian Prantl2013-07-181-2/+2
| | | | llvm-svn: 186557
* Instead of checking against some version of "isType()" go ahead andEric Christopher2013-07-181-14/+14
| | | | | | | use the conversion to bool to check if we've managed to get a type that isn't default constructed - as we meant to in the first place. llvm-svn: 186556
* Fix a compile error caught by bb-chapuni.Adrian Prantl2013-07-181-2/+3
| | | | llvm-svn: 186555
* Fix a compile error caught by bb-chapuni.Adrian Prantl2013-07-181-1/+1
| | | | llvm-svn: 186554
* Replace llvm::DIBuilder::DisableDebugLocations() with two RAII interfacesAdrian Prantl2013-07-181-1/+38
| | | | | | | | | | | | | inspired by CodegenFunction::LexicalScope. - NoLocation temporarily turns off debug locations altogether. This is useful for emitting instructions that should be counted towards the function prologue. - BuiltinLocation temporarily switches to an artificial debug location that has a valid scope, but no line information. This is useful when emitting compiler-generated helper functions that have no source location associated with them. llvm-svn: 186552
* Clarified documentation.Adrian Prantl2013-07-181-1/+2
| | | | llvm-svn: 186551
* Simplify logic by using the appropriate function.Adrian Prantl2013-07-181-1/+1
| | | | llvm-svn: 186550
* 80-column fixes.Eric Christopher2013-07-171-1/+2
| | | | llvm-svn: 186542
* Move BlockLiteralGeneric earlier in CGDebugInfo and removeEric Christopher2013-07-141-5/+3
| | | | | | | BlockLiteralGenericSet and replace with a call to isType() on the BlockLiteralGeneric. llvm-svn: 186293
* Update a few comments and reformat a decl for clarity.Eric Christopher2013-07-141-3/+4
| | | | llvm-svn: 186292
* PR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to ↵David Blaikie2013-07-131-1/+2
| | | | | | | | | | | | | | | emit the full definition of a type in -flimit-debug-info This simplifies the core benefit of -flimit-debug-info by taking a more systematic approach to avoid emitting debug info definitions for types that only require declarations. The previous ad-hoc approach (3 cases removed in this patch) had many holes. The general approach (adding a bit to TagDecl and callback through ASTConsumer) has been discussed with Richard Smith - though always open to revision. llvm-svn: 186262
* Correctly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENTDavid Blaikie2013-07-131-0/+1
| | | | | | | | | | | Test coverage for non-dependent pack expansions doesn't demonstrate a failure prior to this patch (a follow-up commit improving debug info will cover this commit specifically) but covers a related hole in our test coverage. Reviewed by Richard Smith & Eli Friedman. llvm-svn: 186261
* Reapply an improved version of r180816/180817.Adrian Prantl2013-07-091-16/+0
| | | | | | | | | | | Do not generate VLAs as complex variables any more, as they are now correctly represented as breg+0 locations in the backend. (Paired commit with LLVM: r185966) rdar://problem/13658587 llvm-svn: 185967
* Debug Info: clean up usage of Verify.Manman Ren2013-07-021-14/+14
| | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. llvm-svn: 185463
* Use the zero-argument DIBuilder::createNullPtrType in Clang.Peter Collingbourne2013-06-271-2/+1
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1051 llvm-svn: 185115
* Rewrite record layout for ms_struct structs.Eli Friedman2013-06-261-11/+0
| | | | | | | | | | | | | | The old implementation of ms_struct in RecordLayoutBuilder was a complete mess: it depended on complicated conditionals which didn't really reflect the underlying logic, and placed a burden on users of the resulting RecordLayout. This commit rips out almost all of the old code, and replaces it with simple checks in RecordLayoutBuilder::LayoutBitField. This commit also fixes <rdar://problem/14252115>, a bug where class inheritance would cause us to lay out bitfields incorrectly. llvm-svn: 185018
* [AST] Introduce a new DecayedType sugar nodeReid Kleckner2013-06-241-0/+4
| | | | | | | | | | | | | | The goal of this sugar node is to be able to look at an arbitrary FunctionType and tell if any of the parameters were decayed from an array or function type. Ultimately this is necessary to implement Microsoft's C++ name mangling scheme, which mangles decayed arrays differently from normal pointers. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1014 llvm-svn: 184763
* DebugInfo: ensure negative enumerators are emitted as suchDavid Blaikie2013-06-241-1/+1
| | | | | | | | | | There's still a problem here - since we're not appropriately using the signedness/range of the enum to chooset the encoding and emission of enumerators, but GCC has some bugs around this too so I assume that's not /such/ a high priority though I may get to it soon out of completeness. llvm-svn: 184695
* DebugInfo: Support (using GNU extensions) for template template parameters ↵David Blaikie2013-06-221-16/+26
| | | | | | and parameter packs llvm-svn: 184644
* DebugInfo: Random tidying up/simplificationDavid Blaikie2013-06-221-24/+16
| | | | | | No functionality change intended. llvm-svn: 184614
* PR16214: Debug info for types first used via pointers or qualified types & ↵David Blaikie2013-06-211-1/+8
| | | | | | later require definitions llvm-svn: 184594
* Fix all the silly things I committed in r184509David Blaikie2013-06-211-2/+3
| | | | llvm-svn: 184512
* Alternative fix for r184473.David Blaikie2013-06-211-26/+13
| | | | | | | | | | | This just seems a bit tidier/more principled. Based on a patch provided by Adrian - with the only minor tweak that it needed to use "getTypeOrNull" rather than "getCompletedTypeOrNull" since we don't store declarations in the CompletedTypes cache. No intended functionality change. llvm-svn: 184509
* Debug Info: Attempt to resolve forward declarations if we are not emittingAdrian Prantl2013-06-201-2/+27
| | | | | | | | | | limited debug info. This is another small addendum to r184252. rdar://problem/14101097 llvm-svn: 184473
* Debug Info: PR14763/r183329 - specify that non-trivial pass-by-value ↵David Blaikie2013-06-191-0/+3
| | | | | | | | | | parameters are stored indirectly This is to fix the location information for such parameters to refer to the object accessible through the pointer rather than to the pointer parameter itself. llvm-svn: 184367
* Add some comments to r184252.Adrian Prantl2013-06-181-0/+5
| | | | | | rdar://problem/14101097 llvm-svn: 184259
* Emit forward decls for structs with declarations only when we areAdrian Prantl2013-06-181-1/+1
| | | | | | | | | | limiting debug info. FIXME: There is still work left to do here, the testcase should work even with -flimit-debug-info. rdar://problem/14101097 llvm-svn: 184252
* 80-column fixup after recent change to getOrCreateType.Eric Christopher2013-06-071-15/+20
| | | | llvm-svn: 183586
* address some comments on r183474:Adrian Prantl2013-06-071-6/+1
| | | | | | | | | | - factor the name construction part out from constructSetterName - rename constructSetterName to the more appropriate constructSetterSelector no functionality change intended. rdar://problem/14035789 llvm-svn: 183582
* documentation: remove confusing reference to properties.Adrian Prantl2013-06-071-3/+3
| | | | llvm-svn: 183475
* ObjC Debug Info: Emit the names of accessors whenever they diverge fromAdrian Prantl2013-06-071-4/+34
| | | | | | | | the default names, not just when the isImplicit flag is set. rdar://problem/14035789 llvm-svn: 183474
* Improve documentation.Adrian Prantl2013-06-071-6/+12
| | | | llvm-svn: 183473
* PR14763: Debug info for non-trivial record parametersDavid Blaikie2013-06-051-16/+0
| | | | | | | | | | There seems to have been some erroneous code attempting to describe the ABI of parameters (non-trivial record parameters are passed by reference). This would break the type of the function (especially when it caused a mismatch between the type of a declaration & a definition) causing PR14763 and PR14645. llvm-svn: 183329
* PR16214: Debug Info: -flimit-debug-info doesn't omit definitions for types ↵David Blaikie2013-06-051-33/+21
| | | | | | | | | | | | | | | | | | | | used via typedefs In an effort to make -flimit-debug-info more consistent I over-shot the mark & made types used via typedefs never produce definitions in the debug info (even if the type was used in a way that would require a definition). The fix for this is to do exactly what I was hoping to do at some point - plumb the declaration/definition choice through the various layers of "CreateType" in CGDebugInfo. In this way we can produce declarations whenever they are sufficient & definitions otherwise - including when qualifiers are used, for example (discovered in PR14467). This may not be complete (there may be other types/situations where we need to propagate the "declaration/definition" choice) but it lays the basic foundation which we can enhance in future iterations. llvm-svn: 183296
* DebugInfo: Rename CreatePointerType to getOrCreateTypeDeclarationDavid Blaikie2013-05-241-9/+11
| | | | | | | | | | | | | | | | To make this more consistent with 'getOrCreateType' & clarify the distinction between the two. The only thing I couldn't quite communicate in the name is that getOrCreateTypeDeclaration may actually produce a full definition (in -fno-limit-debug-info) but the point is to call it whenever only a declaration is needed & the implementation can choose whether to provide a declaration or definition. (also, unfortunately, getOrCreateType can produce declarations too - we should sure this up by making it not do that - any caller that can tolerate a declaration should be calling getOrCreateTypeDeclaration instead) llvm-svn: 182674
OpenPOWER on IntegriCloud