]> granicus.if.org Git - llvm/commit
Strip debug info when inlining into a nodebug function.
authorAdrian Prantl <aprantl@apple.com>
Tue, 28 Feb 2017 16:58:13 +0000 (16:58 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 28 Feb 2017 16:58:13 +0000 (16:58 +0000)
commit9fa4de797ebb0b5aaa4eedbe63ab38464370caf6
tree475cd26ac7dfec56f7be72daadd669bf212f0ceb
parent09f10e7e60533898a421db7594e5766c0d7f7bef
Strip debug info when inlining into a nodebug function.

The LLVM backend cannot produce any debug info for an llvm::Function
without a DISubprogram attachment. When inlining a debug-info-carrying
function into a nodebug function, there is therefore no reason to keep
any debug info intrinsic calls or debug locations on the instructions.

This fixes a problem discovered in PR32042.

rdar://problem/30679307

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296488 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/InlineFunction.cpp
test/Transforms/Inline/local-as-metadata-undominated-use.ll
test/Transforms/Inline/nodebug.ll [new file with mode: 0644]