SampleProfile: Check for missing debug locations
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 20 Mar 2015 00:56:55 +0000 (00:56 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 20 Mar 2015 00:56:55 +0000 (00:56 +0000)
commit67934e4b411a29383059d3ecab09dc184601c75e
tree5a7439ae61327f6c61ecc71f028a7bc5e78c66e4
parente48bd555a001410e7a7979681bf18d82bccb66b1
SampleProfile: Check for missing debug locations

Don't use `DebugLoc` accessors if we're pointing at null, which will be
a problem after a WIP patch to make the `DIDescriptor` accessors more
strict.  Caught by Frontend/profile-sample-use-loc-tracking.c (in
clang).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232792 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SampleProfile.cpp