Transforms: Stop using DIDescriptor::is*() and auto-casting
Same as r234255, but for lib/Analysis and lib/Transforms. llvm-svn: 234257
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user