Skip to content

Commit

Permalink
Remove unnecessary leftovers from plugin experimentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaimov committed Dec 10, 2024
1 parent f77296a commit f2ae142
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions src/salt_instrument_flang_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,41 +119,8 @@ class SaltInstrumentAction : public PluginParseTreeAction {
<< "\n";
}

void Post(const Fortran::parser::FunctionStmt &f) {
auto &name = std::get<Fortran::parser::Name>(f.t);
if (isInSubprogram_) {
llvm::outs() << "Function:\t"
<< name.ToString() << "\n";
isInSubprogram_ = false;
}
}

bool Pre(const Fortran::parser::FunctionSubprogram &) {
isInSubprogram_ = true;
return true;
}

bool Pre(const Fortran::parser::SubroutineSubprogram &) {
isInSubprogram_ = true;
return true;
}

void Post(const Fortran::parser::SubroutineStmt &s) {
auto &name = std::get<Fortran::parser::Name>(s.t);
if (isInSubprogram_) {
llvm::outs() << "Subroutine:\t"
<< name.ToString() << "\n";
isInSubprogram_ = false;
}
}

void Post(const Fortran::parser::EndProgramStmt &endProgram) {
(void) endProgram; //TODO handle endprogram
}

private:
// Keeps track of current state of traversal
bool isInSubprogram_{false};
bool isInMainProgram_{false};
std::string mainProgramName_;

Expand Down

0 comments on commit f2ae142

Please sign in to comment.