Commit c1f068b8 authored by Andrzej Warzynski's avatar Andrzej Warzynski
Browse files

[flang] Revert "PoC for Flang Driver Plugins"

This patch has not been reviewed and was commited by accident.

This reverts commit 788a5d4a.
parent 39f64c4c
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -5221,6 +5221,10 @@ def enable_noundef_analysis : Flag<["-"], "enable-noundef-analysis">, Group<f_Gr
def discard_value_names : Flag<["-"], "discard-value-names">,
  HelpText<"Discard value names in LLVM IR">,
  MarshallingInfoFlag<CodeGenOpts<"DiscardValueNames">>;
def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">,
  HelpText<"Load the named plugin (dynamic shared object)">;
def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">,
  HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">;
def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">,
    MetaVarName<"<name> <arg>">,
    HelpText<"Pass <arg> to plugin <name>">;
@@ -5784,12 +5788,6 @@ def init_only : Flag<["-"], "init-only">,
  HelpText<"Only execute frontend initialization">;

} // let Group = Action_Group

def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">,
  HelpText<"Load the named plugin (dynamic shared object)">;
def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">,
  HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">;

} // let Flags = [CC1Option, FC1Option, NoDriverOption]

//===----------------------------------------------------------------------===//
+1 −0
Original line number Diff line number Diff line
@@ -390,6 +390,7 @@ endif()
include(CMakeParseArguments)
include(AddFlang)


add_subdirectory(include)
add_subdirectory(lib)
add_subdirectory(cmake/modules)
+0 −2
Original line number Diff line number Diff line
@@ -6,5 +6,3 @@ add_executable(external-hello-world
target_link_libraries(external-hello-world
  FortranRuntime
)
#add_subdirectory(HelloEarth)
add_subdirectory(HelloWorld)
+0 −12
Original line number Diff line number Diff line
add_llvm_library(
    flangHelloWorldPlugin
    MODULE
    HelloWorldPlugin.cpp

    DEPENDS
    clangBasic

    LINK_COMPONENTS
    Option
    Support
)
+0 −18
Original line number Diff line number Diff line
#include "flang/Frontend/FrontendActions.h"
#include "flang/Frontend/FrontendPluginRegistry.h"

__attribute__((constructor))
static void printing() {
  llvm::outs() << "      > Plugin Constructed\n";
}

using namespace Fortran::frontend;

class HelloWorldFlangPlugin : public PluginParseTreeAction
{
    void ExecuteAction() override {
      llvm::outs() << "Hello World from your new plugin (Remote plugin)\n";
    }
};

static FrontendPluginRegistry::Add<HelloWorldFlangPlugin> X("-hello-w", "Hello World Plugin example");
Loading