llvm/clang/examples/PluginsOrder/PluginsOrder.cpp

//===- PluginsOrder.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
//
//===----------------------------------------------------------------------===//

#include "clang/AST/AST.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/Frontend/FrontendPluginRegistry.h"
usingnamespaceclang;

namespace {

class AlwaysBeforeConsumer : public ASTConsumer {};

class AlwaysBeforeAction : public PluginASTAction {};

class AlwaysAfterConsumer : public ASTConsumer {};

class AlwaysAfterAction : public PluginASTAction {};

class CmdAfterConsumer : public ASTConsumer {};

class CmdAfterAction : public PluginASTAction {};

class CmdBeforeConsumer : public ASTConsumer {};

class CmdBeforeAction : public PluginASTAction {};

} // namespace

static FrontendPluginRegistry::Add<CmdBeforeAction> X1("cmd-before", "");
static FrontendPluginRegistry::Add<CmdAfterAction> X2("cmd-after", "");
static FrontendPluginRegistry::Add<AlwaysBeforeAction> X3("always-before", "");
static FrontendPluginRegistry::Add<AlwaysAfterAction> X4("always-after", "");