Skip to content

Commit

Permalink
Replace example plugin with file for instrumentor plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaimov committed Dec 5, 2024
1 parent 8411f62 commit 8a449bb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ if(MLIR_FOUND AND Flang_FOUND)
list(TRANSFORM SALT_FLANG_PLUGIN_HEADER_FILES PREPEND "${CMAKE_SOURCE_DIR}/include/")

set(SALT_FLANG_PLUGIN_SRCS
PrintFlangFunctionNames.cpp
salt_instrument_flang_plugin.cpp
)
list(TRANSFORM SALT_FLANG_PLUGIN_SRCS PREPEND "${CMAKE_SOURCE_DIR}/src/")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
//===-- PrintFlangFunctionNames.cpp ---------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Small example Flang plugin to count/print Functions & Subroutines names.
// It walks the Parse Tree using a Visitor struct that has Post functions for
// FunctionStmt and SubroutineStmt to access the names of functions &
// subroutines. It also has Pre functions for FunctionSubprogram and
// SubroutineSubprogram so a Bool can be set to show that it is the definition
// of a function/subroutine, and not print those that are in an Interface.
// This plugin does not recognise Statement Functions or Module Procedures,
// which could be dealt with through StmtFunctionStmt and MpSubprogramStmt nodes
// respectively.
//
//===----------------------------------------------------------------------===//
/*
Copyright (C) 2024, ParaTools, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#include "flang/Frontend/FrontendActions.h"
#include "flang/Frontend/FrontendPluginRegistry.h"
Expand Down

0 comments on commit 8a449bb

Please sign in to comment.