Go to file
David Peixotto a4817871d2 Safely generate new loop metadata node
Polly was accidently modifying a debug info metadata node when
attempting to generate a new unique metadata node for the loop id.
The problem was that we had dwarf metadata that referred to a
metadata node with a null value, like this:

  !6 = ... some dwarf metadata referring to !7 ...
  !7 = {null}

When we attempt to generate a new metadata node, we reserve the
first space for self-referential node by setting the first argument
to null and then mutating the node later to refer to itself.
However, because the nodes are uniqued based on pointer values, when
we get the new metadata node it actually referred to an existing
node (!7 in the example).  When we went to modify the metadata to
point to itself, we were accidently mutating the dwarf metatdata. We
ended up in this situation:

  !6 = ... some dwarf metadata referring to !7 ...
  !7 = {!7}

and this causes an assert when generating the debug info. The fix is
simple, we just need to use a unique value when getting a new
metadata node. The MDNode::getTemporary() provides exactly the API
we need (and it is used in clang to generate the unique nodes).

Differential Revision: http://reviews.llvm.org/D6174

llvm-svn: 221550
2014-11-07 21:44:18 +00:00
clang Fix style. 2014-11-07 21:30:32 +00:00
clang-tools-extra [clang-tidy] google-readability-function: skip std::nullptr_t 2014-11-05 11:08:39 +00:00
compiler-rt [ASan] Fix zero_page_pc test for PowerPC 2014-11-07 20:42:11 +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 Prune CRLF. 2014-10-27 12:37:26 +00:00
libcxx Fix rvalue bug in __has_operator_addressof 2014-11-05 21:20:10 +00:00
libcxxabi Make sure only NEON enabled devices save/restore D16+ registers 2014-11-07 16:33:58 +00:00
lld [mach-o] Add support for -order_file option 2014-11-07 21:01:21 +00:00
lldb This was meant to be count, not m_count 2014-11-07 20:37:17 +00:00
llvm Remove unused variable. 2014-11-07 21:33:09 +00:00
openmp I apologise in advance for the size of this check-in. At Intel we do 2014-10-07 16:25:50 +00:00
polly Safely generate new loop metadata node 2014-11-07 21:44:18 +00:00