summaryrefslogtreecommitdiff
path: root/test/DebugInfo
Commit message (Collapse)AuthorAge
* Revert "Revert "Revert "PR20038: DebugInfo: Inlined call sites where the ↵David Blaikie2014-06-27
| | | | | | | | | | | caller has debug info but the call itself has no debug location.""" Reverting this again, didn't mean to commit it - while r211872 fixes one of the issues here, there are still others to figure out and address. This reverts commit r211871. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211873 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert "PR20038: DebugInfo: Inlined call sites where the caller has ↵David Blaikie2014-06-27
| | | | | | | | debug info but the call itself has no debug location."" This reverts commit r211724. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211871 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "PR20038: DebugInfo: Inlined call sites where the caller has debug ↵David Blaikie2014-06-25
| | | | | | | | | | | info but the call itself has no debug location." This reverts commit r211723. Breaks the ASan/compiler-rt build... guess I didn't test very far at all :/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211724 91177308-0d34-0410-b5e6-96231b3b80d8
* PR20038: DebugInfo: Inlined call sites where the caller has debug info but ↵David Blaikie2014-06-25
| | | | | | | | | | | | | | | | | | the call itself has no debug location. This situation does bad things when inlined, so I've fixed Clang not to produce inlinable call sites without locations when the caller has debug info (in the one case where I could find that this occurred). This updates the PR20038 test case to be what clang now produces, and readds the assertion that had to be removed due to this bug. I've also beefed up the debug info verifier to help diagnose these issues in the future, and I hope to add checks to the inliner to just assert-fail if it encounters this situation. If, in the future, we decide we have to cope with this situation, the right thing to do is probably to just remove all the DebugLocs from the inlined instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211723 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix another asserting method in the null streamer.Rafael Espindola2014-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211668 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix up scoping in a few tests (and delete one that validates unnecessary ↵David Blaikie2014-06-24
| | | | | | | | | | | | | | | | behavior). Most of this is just tests that were silently succeeding in spite of schema changes I made over a year ago. Cleaning them up as they lead to failures in a change I'm working on/will come soon. test/DebugInfo/2010-01-19-DbgScope.ll was removed as it tested miscoping where a DebugLoc described a location not in the current function. The test case doesn't describe why this is a valid situation and should be supported, so I'm removing it and shortly going to commit changes that make this firmly unsupported/assert-fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211628 91177308-0d34-0410-b5e6-96231b3b80d8
* Move test so that it is skipped if the ARM target is not enabled.Rafael Espindola2014-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211366 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow a target to create a null streamer.Rafael Espindola2014-06-20
| | | | | | | | | Targets can assume that a target streamer is present, so they have to be able to construct a null streamer in order to set the target streamer in it to. Fixes a crash when using the null streamer with arm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211358 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typosAlp Toker2014-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211304 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Fission: Ensure the address pool entries for location lists are ↵David Blaikie2014-06-19
| | | | | | | | | emitted. The address pool was being emitted before location lists. The latter could add more entries to the pool which would be lost/never emitted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211284 91177308-0d34-0410-b5e6-96231b3b80d8
* MCNullStreamer: assign file IDs to resolve crashes and errorsAlp Toker2014-06-19
| | | | | | | | | | Use the MCStreamer base implementations for file ID tracking instead of overriding them as no-ops. Avoids assertions when streaming Dwarf debug info, and fixes ASM parsing of loc and file directives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211282 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit DWARF3 call frame information when DWARF3+ debug info is requestedOliver Stannard2014-06-19
| | | | | | | | | | | | | | | | | | Currently, llvm always emits a DWARF CIE with a version of 1, even when emitting DWARF 3 or 4, which both support CIE version 3. This patch makes it emit the newer CIE version when we are emitting DWARF 3 or 4. This will not reduce compatibility, as we already emit other DWARF3/4 features, and is worth doing as the DWARF3 spec removed some ambiguities in the interpretation of call frame information. It also fixes a minor bug where the "return address" field of the CIE was encoded as a ULEB128, which is only valid when the CIE version is 3. There are no test changes for this, because (as far as I can tell) none of the platforms that we test have a return address register with a DWARF register number >127. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211272 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow X86FastIsel to cope with 64 bit absolute relocationsLouis Gerbarg2014-06-17
| | | | | | | | | | | | This patch is a follow up to r211040 & r211052. Rather than bailing out of fast isel this patch will generate an alternate instruction (movabsq) instead of the leaq. While this will always have enough room to handle the 64 bit displacment it is generally over kill for internal symbols (most displacements will be within 32 bits) but since we have no way of communicating the code model to the the assmebler in order to avoid flagging an absolute leal/leaq as illegal when using a symbolic displacement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211130 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve comments for r211040Louis Gerbarg2014-06-16
| | | | | | | | Added comment to clarify why we r211040 choose to bail out of fast isel instead of generating a more complicated relocation, and fix mislabelled register in the comments of the asan test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211052 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix illegal relocations in X86FastISelLouis Gerbarg2014-06-16
| | | | | | | | | | | | On x86_86 the lea instruction can only use a 32 bit immediate value. When the code is compiled statically the RIP register is not used, meaning the immediate is all that can be used for the relocation, which is not sufficient in the case of targets more than +/- 2GB away. This patch bails out of fast isel in those cases and reverts to DAG which does the right thing. Test case included. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211040 91177308-0d34-0410-b5e6-96231b3b80d8
* PR20038: DebugInfo missing DIEs for some concrete variables.David Blaikie2014-06-15
| | | | | | | | I haven't nailed this down entirely, but this is about as small of a test case as I can seem to construct and adequately demonstrates the crasher. I'll continue investigating the root cause/fix(es). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210993 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Reference abstract definitions from variables in concrete ↵David Blaikie2014-06-13
| | | | | | | | | | | | definitions that preceed their first inline definition. Rather than relying on abstract variables looked up at the time the concrete variable is created, look them up at the end of the module to ensure they're referenced even if they're created after the concrete definition. This completes/matches the work done in r209677 to handle this for the subprograms themselves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210946 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Following up to r209677, refactor local variable emission to ↵David Blaikie2014-06-13
| | | | | | | | | | | | | | | | delay the choice between emitting the definition attributes or using DW_AT_abstract_definition This doesn't fix the abstract variable handling yet, but it introduces a similar delay mechanism as was added for subprograms, causing DW_AT_location to be reordered to the beginning of the attribute list for local variables, and fixes all the test fallout for that. A subsequent commit will remove the abstract variable handling in DbgVariable and just do the abstract variable lookup at module end to ensure that abstract variables introduced after their concrete counterparts are appropriately referenced by the concrete variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210943 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Refactor some tests to allow DW_AT_name to not be the first ↵David Blaikie2014-06-13
| | | | | | | | | | | | | | | | | attribute in a local variable. In an effort to fix concrete variables referencing abstract origins where the concrete variable preceeds the first inlined usage, the addition of attributes such as name, file, etc will be delayed until the end of the module (to wait to see if any inlined instances have occurred, thus necessitating an abstract definition that the concrete definition should also reference). These test cases don't actually need to care about this ordering of attributes, so update them to be more resilient to such changes coming in the near future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210940 91177308-0d34-0410-b5e6-96231b3b80d8
* test/DebugInfo/X86/dbg-value-isel.s: correct lexical block descriptor to ↵David Blaikie2014-06-13
| | | | | | | | | | match schema This silently broke a long time ago when I unified some aspects of the debug info schema. I'm just cleaning these up if/when they become a problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210939 91177308-0d34-0410-b5e6-96231b3b80d8
* [DWARF parser] Fix broken address ranges construction.Alexey Samsonov2014-06-12
| | | | | | | | | | | | | | | | | | Previous algorithm for constructing [Address ranges]->[Compile Units] mapping was wrong. It somewhat relied on the assumption that address ranges for different compile units may not overlap. It is not so. For example, two compile units may contain the definition of the same linkonce_odr function. These definitions will be merged at link-time, resulting in equivalent .debug_ranges entries for both these units Instead of sorting and merging original address ranges (from .debug_ranges and .debug_aranges), implement a different approach: save endpoints of all ranges, and then use a sweep-line approach to construct the desired mapping. If we find that certain address maps to several compilation units, we just pick any of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210860 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-symbolizer] Fix parsing DW_AT_ranges in Fission skeleton compile unit ↵Alexey Samsonov2014-06-12
| | | | | | | | | | | | | | | DIEs. Turns out that DW_AT_ranges_base attribute sets the offset for DW_AT_ranges values specified in the .dwo file, but not for DW_AT_ranges specified in the skeleton compile unit DIE in the main executable. This is extremely confusing, and would hopefully be fixed in DWARF-5 when it's finalized. For now this behavior makes sense, as otherwise Fission would break DWARF consumers who doesn't know anything about DW_AT_ranges_base. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210809 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve the test for inlining of __no_debug__ functions.Evgeniy Stepanov2014-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210645 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce verbiage of lit.local.cfg filesAlp Toker2014-06-09
| | | | | | We can just split targets_to_build in one place and make it immutable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210496 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate better location ranges for some register-described variables.Alexey Samsonov2014-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't terminate location ranges for register-described variables at the end of machine basic block if this register is never modified in the function body, except for the prologue and epilogue. Prologue location is guessed by FrameSetup flags on MachineInstructions, while epilogue location is deduced from debug locations of instructions in the basic blocks ending with return instructions. This patch is mostly targeted to fix non-trivial debug locations for variables addressed via stack and frame pointers. It is not really a generic fix. We can still produce poor debug info for register-described variables if this register *is* modified somewhere in the function, but in unrelated places. This might be the case for the debug info in optimized binaries (e.g. for local variables in inlined functions). LiveDebugVariables pass in CodeGen attempts to fix this problem by adjusting DBG_VALUE instructions, but this pass is tied to greedy register allocator, which is used in optimized builds only. Proper fix would likely involve generalizing LiveDebugVariables to all register allocators. See more discussion in http://reviews.llvm.org/D3933 review thread. I'm proceeding with this patch to fix immediate severe problems and important cases, e.g. fix completely broken debug info with AddressSanitizer and fix PR19307 (missing debug info for by-value std::string arguments). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210492 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix line numbers for code inlined from __nodebug__ functions.Evgeniy Stepanov2014-06-09
| | | | | | | | | | | | | | | Instructions from __nodebug__ functions don't have file:line information even when inlined into no-nodebug functions. As a result, intrinsics (SSE and other) from <*intrin.h> clang headers _never_ have file:line information. With this change, an instruction without !dbg metadata gets one from the call instruction when inlined. Fixes PR19001. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210459 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typosAlp Toker2014-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210401 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Use the scope of the function declaration, if any, to name a ↵David Blaikie2014-06-06
| | | | | | | | | | function in DWARF pubnames This ensures that member functions, for example, are entered into pubnames with their fully qualified name, rather than inside the global namespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210379 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: pubnames: include file-local (static or anonymous namespace) ↵David Blaikie2014-06-06
| | | | | | | | | variables and anonymous namespaces themselves. Still some issues with name qualification, FIXMEs added to test cases and fixes will come next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210378 91177308-0d34-0410-b5e6-96231b3b80d8
* Match the full hex offsets in test/DebugInfo/X86/gnu-public-names.llDavid Blaikie2014-06-06
| | | | | | | | | | | | | | | | | These checks were accidentally skipping the 0x prefix in the hex offsets, then cunningly ignoring the prefix in the use of those captured values. Except in the case of the unit length, where the match was only matching the leading '0' before the x in the 0x prefix, then matching that against the length. We can't actually express the length association here, as the length field in the Compile Unit header does not include the length field itself, but the length field in the pubnames section /does/ include the size of the length field in the Compile Unit header - so the two numbers are actually 4 bytes different. Just skip matching that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210364 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove DWARF3 testing of test/DebugInfo/X86/gnu-public-names.llDavid Blaikie2014-06-06
| | | | | | | | | | | | | | | | | This was added to test that DW_AT_GNU_pubnames used sec_offset in DWARF4 and data4 in DWARF3 and below. Since then we've updated DW_AT_GNU_pubnames to be a flag, rather than a section offset anyway. Granted this still differs between DWARF 3 and DWARF 4 (FORM_flag_present versun FORM_flag) but it doesn't seem worthwhile testing that codepath again here. It's covered adequately in many other test cases. And while I'm here, don't hardcode the byte size of the compile unit - it's not relevant to this test and just makes it brittle if/when anything changes in the way this CU is emitted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210362 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL: test/DebugInfo/missing-abstract-variable.ll on s390x as wellUlrich Weigand2014-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210264 91177308-0d34-0410-b5e6-96231b3b80d8
* PR19388: DebugInfo: Emit dead arguments in their originally declared order.David Blaikie2014-06-05
| | | | | | | | | | | | | | | | | | | | | | | Unused arguments were not being added to the argument list, but instead treated as arbitrary scope variables. This meant they weren't carefully added in the original argument order. In this particular example, though, it turns out the argument is only /mostly/ unused (well, actually it's entirely used, but in a specific way). It's a struct that, due to ABI reasons, is decomposed into chunks (exactly one chunk, since it has one member) and then passed. Since only one of those chunks is used (SROA, etc, kill the original reconstitution code) we don't have a location to describe the whole variable. In this particular case, since the struct consists of just the one int, once we have partial location information, this should have a location that describes the entire variable (since the piece is the entirety of the object). And at some point we'll need to describe the location of even /entirely/ unused arguments so that they can at least be printed on function entry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210231 91177308-0d34-0410-b5e6-96231b3b80d8
* Use AArch64 instead of now removed ARM64 in test configsAlexey Samsonov2014-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210229 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Reapply r209984 (reverted in r210143), asserting that abstract ↵David Blaikie2014-06-04
| | | | | | | | | | | | | | | | | DbgVariables have DIEs. Abstract variables within abstract scopes that are entirely optimized away in their first inlining are omitted because their scope is not present so the variable is never created. Instead, we should ensure the scope is created so the variable can be added, even if it's been optimized away in its first inlining. This fixes the incorrect debug info in missing-abstract-variable.ll (added in r210143) and passes an asserts self-hosting build, so hopefully there's not more of these issues left behind... *fingers crossed*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210221 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL: test/DebugInfo/missing-abstract-variable.ll on mips and ppc64 due to ↵David Blaikie2014-06-04
| | | | | | an inlined parameter that goes missing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210200 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Partial revert r209984 due to more cases where abstract ↵David Blaikie2014-06-04
| | | | | | | | | | | | | | | DbgVariables do not have associated DIEs. Along with a test case to demonstrate that due to inlining order there are cases where abstract variable DIEs are not constructed since the abstract subprogram was built due to a previous inlining that optimized away those variables. This produces incorrect debug info (the 'missing' abstract variable causes the inlined instance of that variable to be emitted with a full description (name, line, file) rather than referencing the abstract origin), but this commit at least ensures that it doesn't crash... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210143 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Assert that DbgVariables have associated DIEsDavid Blaikie2014-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was previously committed in r209680 and reverted in r209683 after it caused sanitizer builds to crash. The issue seems to be that the DebugLoc associated with dbg.value IR intrinsics isn't necessarily accurate. Instead, we duplicate the DIVariables and add an InlinedAt field to them to record their location. We were using this InlinedAt field to compute the LexicalScope for the variable, but not using it in the abstract DbgVariable construction and mapping. This resulted in a formal parameter to the current concrete function, correctly having no InlinedAt information, but incorrectly having a DebugLoc that described an inlined location within the function... thus an abstract DbgVariable was created for the variable, but its DIE was never constructed (since the LexicalScope had no such variable). This DbgVariable was silently ignored (by testing for a non-null DIE on the abstract DbgVariable). So, fix this by using the right scoping information when constructing abstract DbgVariables. In the long run, I suspect we want to undo the work that added this second kind of location tracking and fix the places where the DebugLoc propagation on the dbg.value intrinsic fails. This will shrink debug info (by not duplicating DIVariables), make it more efficient (by not having to construct new DIVariable metadata nodes to try to map back to a single variable), and benefit all instructions. But perhaps there are insurmountable issues with DebugLoc quality that I'm unaware of... I just don't know how we can't /just keep the DebugLoc from the dbg.declare to the dbg.values and never get this wrong/. Some history context: http://llvm.org/viewvc/llvm-project?view=revision&revision=135629 http://llvm.org/viewvc/llvm-project?view=revision&revision=137253 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209984 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typosAlp Toker2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209982 91177308-0d34-0410-b5e6-96231b3b80d8
* No need for those tests to go thru llvm-as and/or llvm-dis.Arnaud A. de Grandmaison2014-05-27
| | | | | | opt can handle them by itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209689 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Create abstract function definitions even when concrete ↵David Blaikie2014-05-27
| | | | | | | | | | | | | | | definitions preceed inline definitions. After much puppetry, here's the major piece of the work to ensure that even when a concrete definition preceeds all inline definitions, an abstract definition is still created and referenced from both concrete and inline definitions. Variables are still broken in this case (see comment in dbg-value-inlined-parameter.ll test case) and will be addressed in follow up work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209677 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Lazily construct subprogram definition DIEs.David Blaikie2014-05-27
| | | | | | | | | | | | | | | | A further step to correctly emitting concrete out of line definitions preceeding inlined instances of the same program. To do this, emission of subprograms must be delayed until required since we don't know which (abstract only (if there's no out of line definition), concrete only (if there are no inlined instances), or both) DIEs are required at the start of the module. To reduce the test churn in the following commit that actually fixes the bug, this commit introduces the lazy DIE construction and cleans up test cases that are impacted by the changes in the resulting DIE ordering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209675 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Lazily attach definition attributes to definitions.David Blaikie2014-05-27
| | | | | | | | | | | | | | | | | | | | | This is a precursor to fixing inlined debug info where the concrete, out-of-line definition may preceed any inlined usage. To cope with this, the attributes that may appear on the concrete definition or the abstract definition are delayed until the end of the module. Then, if an abstract definition was created, it is referenced (and no other attributes are added to the out-of-line definition), otherwise the attributes are added directly to the out-of-line definition. In a couple of cases this causes not just reordering of attributes, but reordering of types. When the creation of the attribute is delayed, if that creation would create a type (such as for a DW_AT_type attribute) then other top level DIEs may've been constructed during the delay, causing the referenced type to be created and added after those intervening DIEs. In the extreme case, in cross-cu-inlining.ll, this actually causes the DW_TAG_basic_type for "int" to move from one CU to another. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209674 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Fix argument ordering in test by adding argument numbering.David Blaikie2014-05-27
| | | | | | | | | | This old test didn't have the argument numbering that's now squirelled away in the high bits of the line number in the DW_TAG_arg_variable metadata. Add the numbering and update the test to ensure arguments are in-order. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209669 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Test linkonce-odr functions under LTO.David Blaikie2014-05-26
| | | | | | | | | | | | | | | | | | | | | | | This was previously regressed/broken by r192749 (reverted due to this issue in r192938) and I was about to break it again by accident with some more invasive changes that deal with the subprogram lists. So to avoid that and further issues - here's a test. It's a pretty basic test - in both r192749 and my impending case, this test would crash, but checking the basics (that we put a subprogram in just one of the two CUs) seems like a good start. We still get this wrong in weird ways if the linkonce-odr function happens to not be identical in the metadata (because it's defined in two different files (hence the # line directives in this test), etc) even though it meets the language requirements (identical token stream) for such a thing. That results in two subprogram DIEs, but only one of them gets the parameter and high/low pc information, etc. We probably need to use the DIRef infrastructure to deduplicate functions as we do types to address this issue - or perhaps teach the BC linker to remove the duplicate entries in subprogram lists? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209614 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Fix inlining with #file directives a little harderDavid Blaikie2014-05-25
| | | | | | | | | | | Seems my previous fix was insufficient - we were still not adding the inlined function to the abstract scope list. Which meant it wasn't flagged as inline, didn't have nested lexical scopes in the abstract definition, and didn't have abstract variables - so the inlined variable didn't reference an abstract variable, instead being described completely inline. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209602 91177308-0d34-0410-b5e6-96231b3b80d8
* Streamline test case by avoiding a temporary file and piping llc output ↵David Blaikie2014-05-25
| | | | | | | | | straight to llvm-dwarfdump We still do temporary files in many cases, just updating this particular one because I was debugging it and made this change while doing so. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209601 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGen: Make MachineBasicBlock::back skip to the beginning of the last bundle.Benjamin Kramer2014-05-24
| | | | | | | | | | | | This makes front/back symmetric with begin/end, avoiding some confusion. Added instr_front/instr_back for the old behavior, corresponding to instr_begin/instr_end. Audited all three in-tree users of back(), all of them look like they don't want to look inside bundles. Fixes an assertion (PR19815) when generating debug info on mips, where a delay slot was bundled at the end of a branch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209580 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64/ARM64: move ARM64 into AArch64's placeTim Northover2014-05-24
| | | | | | | | | | | | | | | This commit starts with a "git mv ARM64 AArch64" and continues out from there, renaming the C++ classes, intrinsics, and other target-local objects for consistency. "ARM64" test directories are also moved, and tests that began their life in ARM64 use an arm64 triple, those from AArch64 use an aarch64 triple. Both should be equivalent though. This finishes the AArch64 merge, and everyone should feel free to continue committing as normal now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209577 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64/ARM64: remove AArch64 from tree prior to renaming ARM64.Tim Northover2014-05-24
| | | | | | | | | | | | | | | | I'm doing this in two phases for a better "git blame" record. This commit removes the previous AArch64 backend and redirects all functionality to ARM64. It also deduplicates test-lines and removes orphaned AArch64 tests. The next step will be "git mv ARM64 AArch64" and rewire most of the tests. Hopefully LLVM is still functional, though it would be even better if no-one ever had to care because the rename happens straight afterwards. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209576 91177308-0d34-0410-b5e6-96231b3b80d8