summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SampleProfile.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-06 23:27:00 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-06 23:27:00 +0000
commit6186fb2cd008ea9445ebc1dddced644cdbaeead5 (patch)
treebaf2faaf46e56cc70b74c23f9aa1cee6a02f4a7d /llvm/lib/Transforms/Scalar/SampleProfile.cpp
parentc755128673b035567f712a5afea7a5f1a24bf4f2 (diff)
downloadbcm5719-llvm-6186fb2cd008ea9445ebc1dddced644cdbaeead5.tar.gz
bcm5719-llvm-6186fb2cd008ea9445ebc1dddced644cdbaeead5.zip
Transforms: Stop using DIDescriptor::is*() and auto-casting
Same as r234255, but for lib/Analysis and lib/Transforms. llvm-svn: 234257
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SampleProfile.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SampleProfile.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/SampleProfile.cpp b/llvm/lib/Transforms/Scalar/SampleProfile.cpp
index f56e2f1d87c..705d042a809 100644
--- a/llvm/lib/Transforms/Scalar/SampleProfile.cpp
+++ b/llvm/lib/Transforms/Scalar/SampleProfile.cpp
@@ -642,8 +642,7 @@ void SampleProfileLoader::propagateWeights(Function &F) {
/// \returns the line number where \p F is defined. If it returns 0,
/// it means that there is no debug information available for \p F.
unsigned SampleProfileLoader::getFunctionLoc(Function &F) {
- DISubprogram S = getDISubprogram(&F);
- if (S.isSubprogram())
+ if (DISubprogram S = getDISubprogram(&F))
return S.getLineNumber();
// If could not find the start of \p F, emit a diagnostic to inform the user
OpenPOWER on IntegriCloud