Go to file
Duncan P. N. Exon Smith 81f522a62e Verifier: Check that inlined-at locations agree
Check that the `MDLocalVariable::getInlinedAt()` in a debug info
intrinsic's variable always matches the `MDLocation::getInlinedAt()` of
its `!dbg` attachment.

The goal here is to get rid of `MDLocalVariable::getInlinedAt()`
entirely (PR22778), since it's expensive and unnecessary, but I'll let
this verifier check bake for a while (a week maybe?) first.  I've
updated the testcases that had the wrong value for `inlinedAt:`.

This checks that things are sane in the IR, but currently things go out
of whack in a few places in the backend.  I'll follow shortly with
assertions in the backend (with code fixes).

If you have out-of-tree testcases that just started failing, here's how
I updated these ones:

 1. The verifier check gives you the basic block, function, instruction,
    and relevant metadata arguments (metadata numbering doesn't
    necessarily match the source file, unfortunately).
 2. Look at the `@llvm.dbg.*()` instruction, and compare the
    `inlinedAt:` fields of the variable argument (second `metadata`
    argument) and the `!dbg` attachment.
 3. Figure out based on the variable `scope:` chain and the functions in
    the file whether the variable has been inlined (and into what), so
    you can determine which `inlinedAt:` is actually correct.  In all of
    the in-tree testcases, the `!MDLocation()` was correct and the
    `!MDLocalVariable()` was wrong, but YMMV.
 4. Duplicate the metadata that you're going to change, and add/drop the
    `inlinedAt:` field from one of them.  Be careful that the other
    references to the same metadata node point at the correct one.

llvm-svn: 234021
2015-04-03 16:54:30 +00:00
clang Make this test not rely on a backend being registered. 2015-04-03 01:27:02 +00:00
clang-tools-extra [clang-tidy] Clarify message for the google-explicit-constructor check 2015-03-31 16:24:44 +00:00
compiler-rt [sancov] Shrink pc array on Android back to 2**24. 2015-04-03 12:59:39 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Implement atanpi builtin 2015-04-02 17:01:58 +00:00
libcxx Fix race conditions in test class used throughout the std::thread tests. 2015-04-02 21:12:17 +00:00
libcxxabi [libcxxabi] Fix multi-level pointer conversions and pointer to member conversion detection. 2015-04-02 23:26:37 +00:00
lld Fix for revision r234009 (gcc/msvc compilation differences) 2015-04-03 14:44:33 +00:00
lldb Added a testcase that covers loading a module and 2015-04-03 15:39:47 +00:00
llgo llgoi: Fix type identity for imported binary packages. 2015-03-18 08:34:40 +00:00
llvm Verifier: Check that inlined-at locations agree 2015-04-03 16:54:30 +00:00
openmp Replace some unsafe API calls with safe alternatives on Windows, prepare code for similar actions on other platforms - wrap unsafe API calls into macros. 2015-04-02 13:27:08 +00:00
polly Do not scale tile loops 2015-03-31 07:52:36 +00:00