[ArgPromotion] Set debug location at updated callsites
authorVedant Kumar <vsk@apple.com>
Tue, 2 Apr 2019 17:42:17 +0000 (17:42 +0000)
committerVedant Kumar <vsk@apple.com>
Tue, 2 Apr 2019 17:42:17 +0000 (17:42 +0000)
commit9da8a68d6b54c44ef6579af2352dfecf2359431f
tree445be96260af3ad887fc6e5c33352136b052dcea
parentc6bceec01a4bc89757d17a615d08f8f346c59c36
[ArgPromotion] Set debug location at updated callsites

Set the correct debug location on instructions which load arguments in
preparation for a call to an arg-promoted function.

This prevents location cascade from misattributing the line/scope of one
of these loads to the location of the instruction preceding the call.

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

llvm-svn: 357500
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/test/Transforms/ArgumentPromotion/dbg.ll