Revert r302469 "Make it illegal for two Functions to point to the same DISubprogram"
authorHans Wennborg <hans@hanshq.net>
Tue, 9 May 2017 14:44:15 +0000 (14:44 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 9 May 2017 14:44:15 +0000 (14:44 +0000)
commit66fb0d9768edf37c65c20e9d4dafc5d7f96669de
treec6ce81887340e3cbaebe54518cfbc634b7252c65
parent0691483435e2626cc26d11e0c58be6fe353d00e3
Revert r302469 "Make it illegal for two Functions to point to the same DISubprogram"

This caused PR32977.

Original commit message:

> Make it illegal for two Functions to point to the same DISubprogram
>
> As recently discussed on llvm-dev [1], this patch makes it illegal for
> two Functions to point to the same DISubprogram and updates
> FunctionCloner to also clone the debug info of a function to conform
> to the new requirement. To simplify the implementation it also factors
> out the creation of inlineAt locations from the Inliner into a
> general-purpose utility in DILocation.
>
> [1] http://lists.llvm.org/pipermail/llvm-dev/2017-May/112661.html
> <rdar://problem/31926379>
>
> Differential Revision: https://reviews.llvm.org/D32975

llvm-svn: 302533
llvm/include/llvm/IR/DebugLoc.h
llvm/lib/IR/DebugLoc.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Transforms/Utils/CloneFunction.cpp
llvm/lib/Transforms/Utils/InlineFunction.cpp
llvm/test/Verifier/metadata-function-dbg.ll
llvm/unittests/Transforms/Utils/Cloning.cpp