remove SectionFlags::Small: it is only used on Xcore, and we'll find
[oota-llvm.git] / include / llvm / CompilerDriver / Plugin.h
index 03df74944982225c9a7c29bff518994928121481..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;
@@ -33,7 +38,7 @@ namespace llvmc {
     virtual void PopulateCompilationGraph(CompilationGraph&) const = 0;
 
     /// Needed to avoid a compiler warning.
-    virtual ~BasePlugin() {};
+    virtual ~BasePlugin() {}
   };
 
   typedef llvm::Registry<BasePlugin> PluginRegistry;
@@ -71,4 +76,4 @@ namespace llvmc {
 
 }
 
-#endif // LLVM_TOOLS_LLVMC2_PLUGIN_H
+#endif // LLVM_INCLUDE_COMPILER_DRIVER_PLUGIN_H