//
//===----------------------------------------------------------------------===//
//
-// Plugin support for llvmc2.
+// Plugin support for llvmc.
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_TOOLS_LLVMC2_PLUGIN_H
-#define LLVM_TOOLS_LLVMC2_PLUGIN_H
+#ifndef LLVM_INCLUDE_COMPILER_DRIVER_PLUGIN_H
+#define LLVM_INCLUDE_COMPILER_DRIVER_PLUGIN_H
#include "llvm/Support/Registry.h"
/// BasePlugin - An abstract base class for all LLVMC plugins.
struct BasePlugin {
+ /// Priority - Plugin priority, useful for handling dependencies
+ /// between plugins. Plugins with lower priorities are loaded
+ /// first.
+ virtual int Priority() const { return 0; }
+
/// PopulateLanguageMap - The auto-generated function that fills in
/// the language map (map from file extensions to language names).
virtual void PopulateLanguageMap(LanguageMap&) const = 0;
virtual void PopulateCompilationGraph(CompilationGraph&) const = 0;
/// Needed to avoid a compiler warning.
- virtual ~BasePlugin() {};
+ virtual ~BasePlugin() {}
};
typedef llvm::Registry<BasePlugin> PluginRegistry;
}
-#endif // LLVM_TOOLS_LLVMC2_PLUGIN_H
+#endif // LLVM_INCLUDE_COMPILER_DRIVER_PLUGIN_H