summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.h
Commit message (Collapse)AuthorAgeFilesLines
...
* DebugInfo: Prepare for deletion of DIDescriptor subclassesDuncan P. N. Exon Smith2015-04-211-5/+6
| | | | | | | 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-49/+48
| | | | | | | | 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-5/+5
| | | | | | | | | | | 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-68/+70
| | | | | | | `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/+5
| | | | | | | An upcoming LLVM commit will delete `DIScope`, so update users to `MDScope*`. llvm-svn: 235326
* Remove dead code, NFCDuncan P. N. Exon Smith2015-04-181-3/+0
| | | | llvm-svn: 235246
* DebugInfo: Prepare for deletion of DIDescriptorDuncan P. N. Exon Smith2015-04-181-1/+1
| | | | | | 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-22/+21
| | | | | | | | | | | | | | | | | 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
* CodeGen: Update for LLVM API change in r228030Duncan P. N. Exon Smith2015-02-031-2/+2
| | | | | | | The mock tags are no longer in `dwarf::LLVMConstants`; they're in `dwarf::Tag`. llvm-svn: 228032
* Address review feedback for r228003.Adrian Prantl2015-02-031-14/+36
| | | | | | | - use named constructors - get rid of MarkAsPrologue llvm-svn: 228021
* Merge ArtificialLocation into ApplyDebugLocation and make a clearAdrian Prantl2015-02-031-21/+19
| | | | | | | | | | | | | | | | distinction between the different use-cases. With the previous default behavior we would occasionally emit empty debug locations in situations where they actually were strictly required (= on invoke insns). We now have a choice between defaulting to an empty location or an artificial location. Specifically, this fixes a bug caused by a missing debug location when emitting C++ EH cleanup blocks from within an artificial function, such as an ObjC destroy helper function. rdar://problem/19670595 llvm-svn: 228003
* Add documentation to ApplyDebugLocation.Adrian Prantl2015-02-031-2/+4
| | | | llvm-svn: 228002
* DebugInfo: Attribute implicit boolean tests to the expression being tested, ↵David Blaikie2015-01-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not to the outer use of that expression. This is half a fix for a GDB test suite failure that expects to start at 'a' in the following code: void func(int a) if (a && b) ... But instead, without this change, the comparison was assigned to '&&' (well, worse actually - because there was a chained 'a && b && c' and it was assigned to the second '&&' because of a recursive application of this bug) and then the load folded into the comparison so breaking on the function started at '&&' instead of 'a'. The other part of this needs to be fixed in LLVM where it's ignoring the location of the icmp and instead using the location of the branch instruction. The fix to the conditional operator is actually a no-op currently, because the conditional operator's location coincides with 'a' (the start of the conditional expression) but should probably be '?' instead. See the FIXME in the test case that mentions the ARCMigration tool failures when I tried to make that change. llvm-svn: 227356
* Update the doxygen comments in CGDebugInfo.h to follow the coding standards.Adrian Prantl2015-01-271-46/+46
| | | | llvm-svn: 227221
* DebugInfo: Use the preferred location rather than the start location for ↵David Blaikie2015-01-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expression line info This causes things like assignment to refer to the '=' rather than the LHS when attributing the store instruction, for example. There were essentially 3 options for this: * The beginning of an expression (this was the behavior prior to this commit). This meant that stepping through subexpressions would bounce around from subexpressions back to the start of the outer expression, etc. (eg: x + y + z would go x, y, x, z, x (the repeated 'x's would be where the actual addition occurred)). * The end of an expression. This seems to be what GCC does /mostly/, and certainly this for function calls. This has the advantage that progress is always 'forwards' (never jumping backwards - except for independent subexpressions if they're evaluated in interesting orders, etc). "x + y + z" would go "x y z" with the additions occurring at y and z after the respective loads. The problem with this is that the user would still have to think fairly hard about precedence to realize which subexpression is being evaluated or which operator overload is being called in, say, an asan backtrace. * The preferred location or 'exprloc'. In this case you get sort of what you'd expect, though it's a bit confusing in its own way due to going 'backwards'. In this case the locations would be: "x y + z +" in lovely postfix arithmetic order. But this does mean that if the op+ were an operator overload, say, and in a backtrace, the backtrace will point to the exact '+' that's being called, not to the end of one of its operands. (actually the operator overload case doesn't work yet for other reasons, but that's being fixed - but this at least gets scalar/complex assignments and other plain operators right) llvm-svn: 227027
* DebugInfo: Remove forced column-info workaround for inlined callsDavid Blaikie2015-01-211-5/+2
| | | | | | | | | | | | | | | | | This workaround was to provide unique call sites to ensure LLVM's inline debug info handling would properly unique two calls to the same function on the same line. Instead, this has now been fixed in LLVM (r226736) and the workaround here can be removed. Originally committed in r176895, but this isn't a straight revert due to all the changes since then. I just searched for anything ForcedColumn* related and removed them. We could test this - but it didn't strike me as terribly valuable once we're no longer adding this workaround everything just works as expected & it's no longer a special case to test for. llvm-svn: 226738
* Recommit r225083 (reverted in r225361) now that calls to aggregate ↵David Blaikie2015-01-181-3/+0
| | | | | | | | | | | | | | | | | | | initializers from in class non-static data members are explicitly attributed to the desired line. The code setting the debug location being removed here was accidentally leaking a location into the call to the non-static data member's ctor call. Without it the call had no location and could cause assertion failures if it was inlined. Now that it has a location (and a correct one at that) this code should hopefully be no longer needed. It's possible of course that other parts of the debug info are also relying on the debug locations being set here to leak to where they're needed - so we might see the same assertions again & will have to investigate what the dependence was/is. But the chances are good that any of those are debug info line table quality bugs we've just not found yet anyway - so it'll be good to flush them out. llvm-svn: 226383
* Reapply r225000 (reverted in r225555): DebugInfo: Generalize debug info ↵David Blaikie2015-01-141-28/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | location handling (and follow-up commits). Several pieces of code were relying on implicit debug location setting which usually lead to incorrect line information anyway. So I've fixed those (in r225955 and r225845) separately which should pave the way for this commit to be cleanly reapplied. The reason these implicit dependencies resulted in crashes with this patch is that the debug location would no longer implicitly leak from one place to another, but be set back to invalid. Once a call with no/invalid location was emitted, if that call was ever inlined it could produce invalid debugloc chains and assert during LLVM's codegen. There may be further cases of such bugs in this patch - they're hard to flush out with regression testing, so I'll keep an eye out for reports and investigate/fix them ASAP if they come up. Original commit message: Reapply "DebugInfo: Generalize debug info location handling" Originally committed in r224385 and reverted in r224441 due to concerns this change might've introduced a crash. Turns out this change fixes the crash introduced by one of my earlier more specific location handling changes (those specific fixes are reverted by this patch, in favor of the more general solution). Recommitted in r224941 and reverted in r224970 after it caused a crash when building compiler-rt. Looks to be due to this change zeroing out the debug location when emitting default arguments (which were meant to inherit their outer expression's location) thus creating call instructions without locations - these create problems for inlining and must not be created. That is fixed and tested in this version of the change. Original commit message: This is a more scalable (fixed in mostly one place, rather than many places that will need constant improvement/maintenance) solution to several commits I've made recently to increase source fidelity for subexpressions. This resetting had to be done at the DebugLoc level (not the SourceLocation level) to preserve scoping information (if the resetting was done with CGDebugInfo::EmitLocation, it would've caused the tail end of an expression's codegen to end up in a potentially different scope than the start, even though it was at the same source location). The drawback to this is that it might leave CGDebugInfo out of sync. Ideally CGDebugInfo shouldn't have a duplicate sense of the current SourceLocation, but for now it seems it does... - I don't think I'm going to tackle removing that just now. I expect this'll probably cause some more buildbot fallout & I'll investigate that as it comes up. Also these sort of improvements might be starting to show a weakness/bug in LLVM's line table handling: we don't correctly emit is_stmt for statements, we just put it on every line table entry. This means one statement split over multiple lines appears as multiple 'statements' and two statements on one line (without column info) are treated as one statement. I don't think we have any IR representation of statements that would help us distinguish these cases and identify the beginning of each statement - so that might be something we need to add (possibly to the lexical scope chain - a scope for each statement). This does cause some problems for GDB and possibly other DWARF consumers. llvm-svn: 225956
* Revert "DebugInfo: Generalize debug info location handling" and related commitsDavid Blaikie2015-01-091-11/+28
| | | | | | | | | | | | This reverts commit r225000, r225021, r225083, r225086, r225090. The root change (r225000) still has several issues where it's caused calls to be emitted without debug locations. This causes assertion failures if/when those calls are inlined. I'll work up some test cases and fixes before recommitting this. llvm-svn: 225555
* Revert r225085, it caused PR22096.Nico Weber2015-01-071-0/+3
| | | | | | | | PR22096 has several test cases that assert that look fairly different. I'm adding one of those as an automated test, but when relanding the other cases should probably be checked as well. llvm-svn: 225361
* DebugInfo: Provide a less subtle way to set the debug location of simple ret ↵David Blaikie2015-01-021-0/+1
| | | | | | | | instructions un-XFAILing the test XFAIL'd in r225086 after it regressed in r225083. llvm-svn: 225090
* DebugInfo: Remove some now-unnecessary location handling around function ↵David Blaikie2015-01-021-3/+0
| | | | | | | | | | | | | | arguments. r225000 generalized debug info line info handling for expressions such that this code is no longer necessary. This removes the last use of CGDebugInfo::getLocation, but not all the uses of CGDebugInfo::CurLoc, which is still used internally in CGDebugInfo. I'd like to do away with all of that & might succeed after a few more patches. llvm-svn: 225085
* DebugInfo: Fix cases where location failed to be updated after r225000David Blaikie2015-01-021-1/+1
| | | | | | | | | | | | | The optimization (that appears to have been here since the earliest implementation (r50848) & has become more complicated over the years) to avoid recreating the debugloc if it would be the same was out of date because ApplyDebugLocation was not re-updating the CurLoc/PrevLoc. This optimization doesn't look terribly beneficial/necessary, so I'm removing it - if it turns up in benchmarks, I'm happy to reconsider/reimplement this with justification, but for now it just seems to add complexity/problems. llvm-svn: 225083
* Reapply "DebugInfo: Generalize debug info location handling"David Blaikie2014-12-301-27/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally committed in r224385 and reverted in r224441 due to concerns this change might've introduced a crash. Turns out this change fixes the crash introduced by one of my earlier more specific location handling changes (those specific fixes are reverted by this patch, in favor of the more general solution). Recommitted in r224941 and reverted in r224970 after it caused a crash when building compiler-rt. Looks to be due to this change zeroing out the debug location when emitting default arguments (which were meant to inherit their outer expression's location) thus creating call instructions without locations - these create problems for inlining and must not be created. That is fixed and tested in this version of the change. Original commit message: This is a more scalable (fixed in mostly one place, rather than many places that will need constant improvement/maintenance) solution to several commits I've made recently to increase source fidelity for subexpressions. This resetting had to be done at the DebugLoc level (not the SourceLocation level) to preserve scoping information (if the resetting was done with CGDebugInfo::EmitLocation, it would've caused the tail end of an expression's codegen to end up in a potentially different scope than the start, even though it was at the same source location). The drawback to this is that it might leave CGDebugInfo out of sync. Ideally CGDebugInfo shouldn't have a duplicate sense of the current SourceLocation, but for now it seems it does... - I don't think I'm going to tackle removing that just now. I expect this'll probably cause some more buildbot fallout & I'll investigate that as it comes up. Also these sort of improvements might be starting to show a weakness/bug in LLVM's line table handling: we don't correctly emit is_stmt for statements, we just put it on every line table entry. This means one statement split over multiple lines appears as multiple 'statements' and two statements on one line (without column info) are treated as one statement. I don't think we have any IR representation of statements that would help us distinguish these cases and identify the beginning of each statement - so that might be something we need to add (possibly to the lexical scope chain - a scope for each statement). This does cause some problems for GDB and possibly other DWARF consumers. llvm-svn: 225000
* Revert "DebugInfo: Generalize debug info location handling"David Blaikie2014-12-291-9/+27
| | | | | | | | | Asserting when building compiler-rt when using a GCC host compiler. Reverting while I investigate. This reverts commit r224941. llvm-svn: 224970
* Reapply "DebugInfo: Generalize debug info location handling"David Blaikie2014-12-291-27/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally committed in r224385 and reverted in r224441 due to concerns this change might've introduced a crash. Turns out this change fixes the crash introduced by one of my earlier more specific location handling changes (those specific fixes are reverted by this patch, in favor of the more general solution). Original commit message: This is a more scalable (fixed in mostly one place, rather than many places that will need constant improvement/maintenance) solution to several commits I've made recently to increase source fidelity for subexpressions. This resetting had to be done at the DebugLoc level (not the SourceLocation level) to preserve scoping information (if the resetting was done with CGDebugInfo::EmitLocation, it would've caused the tail end of an expression's codegen to end up in a potentially different scope than the start, even though it was at the same source location). The drawback to this is that it might leave CGDebugInfo out of sync. Ideally CGDebugInfo shouldn't have a duplicate sense of the current SourceLocation, but for now it seems it does... - I don't think I'm going to tackle removing that just now. I expect this'll probably cause some more buildbot fallout & I'll investigate that as it comes up. Also these sort of improvements might be starting to show a weakness/bug in LLVM's line table handling: we don't correctly emit is_stmt for statements, we just put it on every line table entry. This means one statement split over multiple lines appears as multiple 'statements' and two statements on one line (without column info) are treated as one statement. I don't think we have any IR representation of statements that would help us distinguish these cases and identify the beginning of each statement - so that might be something we need to add (possibly to the lexical scope chain - a scope for each statement). This does cause some problems for GDB and possibly other DWARF consumers. llvm-svn: 224941
* Revert "DebugInfo: Generalize debug info location handling"David Blaikie2014-12-171-9/+27
| | | | | | | | | Fails an ASan bootstrap - I'll try to reproduce locally & sort that out before recommitting. This reverts commit r224385. llvm-svn: 224441
* DebugInfo: Generalize debug info location handlingDavid Blaikie2014-12-161-27/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a more scalable (fixed in mostly one place, rather than many places that will need constant improvement/maintenance) solution to several commits I've made recently to increase source fidelity for subexpressions. This resetting had to be done at the DebugLoc level (not the SourceLocation level) to preserve scoping information (if the resetting was done with CGDebugInfo::EmitLocation, it would've caused the tail end of an expression's codegen to end up in a potentially different scope than the start, even though it was at the same source location). The drawback to this is that it might leave CGDebugInfo out of sync. Ideally CGDebugInfo shouldn't have a duplicate sense of the current SourceLocation, but for now it seems it does... - I don't think I'm going to tackle removing that just now. I expect this'll probably cause some more buildbot fallout & I'll investigate that as it comes up. Also these sort of improvements might be starting to show a weakness/bug in LLVM's line table handling: we don't correctly emit is_stmt for statements, we just put it on every line table entry. This means one statement split over multiple lines appears as multiple 'statements' and two statements on one line (without column info) are treated as one statement. I don't think we have any IR representation of statements that would help us distinguish these cases and identify the beginning of each statement - so that might be something we need to add (possibly to the lexical scope chain - a scope for each statement). This does cause some problems for GDB and possibly other DWARF consumers. llvm-svn: 224385
* IR: Update clang for Metadata/Value split in r223802Duncan P. N. Exon Smith2014-12-091-25/+23
| | | | | | Match LLVM API changes from r223802. llvm-svn: 223803
* Debug info for blocks: Fix a bug caught by the Verifier.Adrian Prantl2014-11-211-1/+2
| | | | | | | | | | | | When emitting nested block definitions, the insert-at-point variant of DIBuilder::insertDeclare() could be called with the insertion point set to the end-of-BasicBlock sentinel, causing the parent pointer of the CallInst to be set to the intentionally bogus value of the sentinel. Fixed by conditionally invoking the correct version of insertDeclare(). rdar://problem/19034882 llvm-svn: 222487
* Fully handle globals and functions in CGDebugInfo::getDeclarationOrDefinition()Frederic Riss2014-11-181-0/+12
| | | | | | | | | | | | | | | | | | | | 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] Move collection of various function/var decl properties into ↵Frederic Riss2014-11-181-0/+15
| | | | | | | | helper functions. NFC. Helpers to be re-used in upcoming commit. llvm-svn: 222219
* Return a DIDescriptor from CGDebugInfo::getDeclarationOrDefinition...Frederic Riss2014-11-061-2/+2
| | | | | | | ... instead of a DIScope that might wrap something that's not actually a DIScope (eg. a DIGlobalVariable); llvm-svn: 221481
* Include debug info for types referenced only via explicit cast expressions.David Blaikie2014-09-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Most of the debug info emission is powered essentially from function definitions - if we emit the definition of a function, we emit the types of its parameters, the members of those types, and so on and so forth. For types that aren't referenced even indirectly due to this - because they only appear in temporary expressions, not in any named variable, we need to explicitly emit/add them as is done here. This is not the only case of such code, and we might want to consider handling "void func(void*); ... func(new T());" (currently debug info for T is not emitted) at some point, though GCC doesn't. There's a much broader solution to these issues, but it's a lot of work for possibly marginal gain (but might help us improve the default -fno-standalone-debug behavior to be even more aggressive in some places). See the original review thread for more details. Patch by jyoti allur (jyoti.yalamanchili@gmail.com)! Differential Revision: http://reviews.llvm.org/D2498 llvm-svn: 218390
* Debug info: Only emit C++ accessibility specifiers when they are divergingAdrian Prantl2014-08-291-4/+8
| | | | | | | | from the default for the containing type. rdar://problem/18154959 llvm-svn: 216800
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-131-2/+2
| | | | | | Modifications made by clang-tidy with minor tweaks. llvm-svn: 215557
* DebugInfo: Blocks: Do not depend on LLVM argument numbering when choosing ↵David Blaikie2014-08-081-1/+1
| | | | | | | | | | | | the debug info argument numbering. Due to the possible presence of return-by-out parameters, using the LLVM argument number count when numbering debug info arguments can end up off-by-one. This could produce two arguments with the same number, which would in turn cause LLVM to emit only one of those arguments (whichever it found last) or assert (r215157). llvm-svn: 215227
* Fix 'source-level' hyphenationsAlp Toker2014-07-091-1/+1
| | | | llvm-svn: 212621
* Delete apparently unused methodAlexey Samsonov2014-06-021-3/+0
| | | | llvm-svn: 210047
* DebugInfo: Use enum instead of unsignedEd Maste2014-05-071-3/+5
| | | | | | | | This makes debuging DebugInfo generation with LLDB a little more pleasant. Differential Revision: http://reviews.llvm.org/D3626 llvm-svn: 208203
* Reapply: DebugInfo: Emit the definition of enums when the definition ↵David Blaikie2014-05-061-0/+2
| | | | | | | | | | | | | | | | | | | preceeds the declaration and initial use. Reverting r208106 to reapply r208065 with a fix for the regression. The issue was that the enum tried to be built even if the declaration hadn't been constructed for debug info - presenting problems for enum templates and typedefs of enums with names for linkage purposes. Original commit message: This regressed a little further 208055 though it was already a little broken. While the requiresCompleteType optimization should be implemented here. Future (possibly near future) work. llvm-svn: 208114
* Revert "DebugInfo: Emit the definition of enums when the definition preceeds ↵David Blaikie2014-05-061-2/+0
| | | | | | | | | | | the declaration and initial use." This is breaking the compiler-rt build. Reverting while I investigate/fix. This reverts commit r208065. llvm-svn: 208106
* DebugInfo: Emit the definition of enums when the definition preceeds the ↵David Blaikie2014-05-061-0/+2
| | | | | | | | | | | | declaration and initial use. This regressed a little further 208055 though it was already a little broken. While the requiresCompleteType optimization should be implemented here. Future (possibly near future) work. llvm-svn: 208065
* PR19598: Ensure temporary metadata nodes used in debug info are destroyed.David Blaikie2014-05-061-2/+2
| | | | | | | | | | | | | | | | | | | CGDebugInfo and DIBuilder were lax in their handling of temporary MDNodes. All temporary nodes need to be deleted, which means they need to be RAUW'd with a permanent node. This was not happening. To ensure this, leverage DIBuilder's new ability to create both permanent and temporary declarations. Ensure all temporary declarations are RAUW'd, even with itself. (DIDescriptor::RAUW handles the case where it is replaced with itself and creates a new, duplicate permanent node to replace itself with) This means that all temporary declarations must be added to the ReplacementMap even if they're never upgraded to definitions - so move the point of insertion into the map to the point of creation of the declarations. llvm-svn: 208055
* Build debug info for ObjC interface types at the end of the translation unit ↵David Blaikie2014-05-051-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | to ensure all ivars are included. This takes a different approach than the completedType/requiresCompleteType work which relies on AST callbacks to upgrade the type declaration to a definition. Instead, just defer constructing the definition to the end of the translation unit. This works because the definition is never needed by other debug info (so far as I know), whereas the definition of a struct may be needed by other debug info before the end of the translation unit (such as emitting the definition of a member function which must refer to that member function's declaration). If we had a callback for whenever an IVar was added to an ObjC interface we could use that, and remove the need for the ObjCInterfaceCache, which might be nice. (also would need a callback for when it was more than just a declaration so we could get properties, etc). A side benefit is that we also don't need the CompletedTypeCache anymore. Just rely on the declaration-ness of a type to decide whether its definition is yet to be emitted. There's still the PR19562 memory leak, but this should hopefully make that a bit easier to approach. llvm-svn: 208015
* Debug info: (Bugfix) Make sure artificial functions like _GLOBAL__I_aAdrian Prantl2014-04-101-2/+6
| | | | | | | | | | | | | | | | are not associated with any source lines. Previously, if the Location of a Decl was empty, EmitFunctionStart would just keep using CurLoc, which would sometimes be correct (e.g., thunks) but in other cases would just point to a hilariously random location. This patch fixes this by completely eliminating all uses of CurLoc from EmitFunctionStart and rather have clients explicitly pass in a SourceLocation for the function header and the function body. rdar://problem/14985269 llvm-svn: 205999
* Add global static variables for anonymous union fields. This makesEric Christopher2014-04-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sure that a debugger can find them when stepping through code, for example from the included testcase: 12 int test_it() { 13 c = 1; 14 d = 2; -> 15 a = 4; 16 return (c == 1); 17 } 18 (lldb) p a (int) $0 = 2 (lldb) p c (int) $1 = 2 (lldb) p d (int) $2 = 2 and a, c, d are all part of the file static anonymous union: static union { int c; int d; union { int a; }; struct { int b; }; }; Fixes PR19221. llvm-svn: 205952
* DebugInfo: Support type alias templatesDavid Blaikie2014-04-061-0/+1
| | | | | | | | We already got the type alias correct (though I've included a test case here) since Clang represents that like any other typedef - but type alias templates weren't being handled. llvm-svn: 205691
* 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
* [Layering] Update include of DebugInfo.h which moved to the IR libraryChandler Carruth2014-03-061-1/+1
| | | | | | in LLVM r203046. llvm-svn: 203047
OpenPOWER on IntegriCloud