remove SectionFlags::Small: it is only used on Xcore, and we'll find
[oota-llvm.git] / include / llvm / CompilerDriver / Plugin.h
index bfaabee77bf36a67a49382b78123524f95a03f5a..9f9eee3c0db99b566b5ec5225a1d5aa830de8d91 100644 (file)
@@ -7,12 +7,12 @@
 //
 //===----------------------------------------------------------------------===//
 //
-//  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"
 
@@ -24,6 +24,11 @@ namespace llvmc {
   /// 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;
@@ -31,6 +36,9 @@ namespace llvmc {
     /// PopulateCompilationGraph - The auto-generated function that
     /// populates the compilation graph with nodes and edges.
     virtual void PopulateCompilationGraph(CompilationGraph&) const = 0;
+
+    /// Needed to avoid a compiler warning.
+    virtual ~BasePlugin() {}
   };
 
   typedef llvm::Registry<BasePlugin> PluginRegistry;
@@ -68,4 +76,4 @@ namespace llvmc {
 
 }
 
-#endif // LLVM_TOOLS_LLVMC2_PLUGIN_H
+#endif // LLVM_INCLUDE_COMPILER_DRIVER_PLUGIN_H