Skip to content

Commit

Permalink
[flang][NFC] Small refactor for IsProcedurePointer
Browse files Browse the repository at this point in the history
Instead of manually checking for procedure-like details in Symbol,
defer it to IsProcedure function.

Differential Revision: https://reviews.llvm.org/D127967
  • Loading branch information
Daniil Dudkin committed Jun 20, 2022
1 parent 60f3b07 commit 4f1fa55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions flang/lib/Evaluate/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1296,8 +1296,7 @@ const Symbol *FindCommonBlockContaining(const Symbol &original) {

bool IsProcedurePointer(const Symbol &original) {
const Symbol &symbol{GetAssociationRoot(original)};
return IsPointer(symbol) &&
(symbol.has<ProcEntityDetails>() || symbol.has<SubprogramDetails>());
return IsPointer(symbol) && IsProcedure(symbol);
}

// 3.11 automatic data object
Expand Down

0 comments on commit 4f1fa55

Please sign in to comment.