diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-11-17 17:30:25 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-11-17 17:30:25 +0000 |
commit | eb71ecf2a8f380206bf8a9e27e6e7855730c88e4 (patch) | |
tree | 0fe26a6f8a9013fba98fe980595413fce6e3b405 /include/llvm/CompilerDriver | |
parent | 973b3a34fa0c0d2244cd271a49b47b2f029d44f5 (diff) | |
download | external_llvm-eb71ecf2a8f380206bf8a9e27e6e7855730c88e4.zip external_llvm-eb71ecf2a8f380206bf8a9e27e6e7855730c88e4.tar.gz external_llvm-eb71ecf2a8f380206bf8a9e27e6e7855730c88e4.tar.bz2 |
Support dependencies between plugins by priority-sorting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CompilerDriver')
-rw-r--r-- | include/llvm/CompilerDriver/Common.td | 5 | ||||
-rw-r--r-- | include/llvm/CompilerDriver/Plugin.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CompilerDriver/Common.td b/include/llvm/CompilerDriver/Common.td index e017326..4589f91 100644 --- a/include/llvm/CompilerDriver/Common.td +++ b/include/llvm/CompilerDriver/Common.td @@ -65,6 +65,11 @@ def or; def inc_weight; def dec_weight; +// Used to specify plugin priority. +class PluginPriority<int p> { + int priority = p; +} + // Option list - used to specify aliases and sometimes help strings. class OptionList<list<dag> l> { list<dag> options = l; diff --git a/include/llvm/CompilerDriver/Plugin.h b/include/llvm/CompilerDriver/Plugin.h index 1dc0df9..5426ac7 100644 --- a/include/llvm/CompilerDriver/Plugin.h +++ b/include/llvm/CompilerDriver/Plugin.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 = 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; |