Add debug location verification for !llvm.loop attachments.
authorAdrian Prantl <aprantl@apple.com>
Tue, 18 Jun 2019 19:42:29 +0000 (19:42 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 18 Jun 2019 19:42:29 +0000 (19:42 +0000)
commit8ff822d61dacf5a9466755eedafd3eeb54abc00d
tree591cea498ecc6495963e01cac06e7473df1e39fd
parenta702f07301feae769e993c125e7d61c36a613730
Add debug location verification for !llvm.loop attachments.

This patch teaches the Verifier how to detect broken !llvm.loop
attachments as discussed in https://reviews.llvm.org/D60831. This
allows LLVM to warn and strip out the broken debug info before
attempting an LTO compilation with input generated by LLVM predating
https://reviews.llvm.org/rL361149.

rdar://problem/51631158

Differential Revision: https://reviews.llvm.org/D63499

llvm-svn: 363725
llvm/lib/IR/Verifier.cpp
llvm/test/Verifier/llvm.loop.ll [new file with mode: 0644]