diff options
author | Andrew Trick <atrick@apple.com> | 2012-02-08 21:22:34 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-02-08 21:22:34 +0000 |
commit | ebe18ef5c286bb7c33f6c43f1963a7d22cd73f40 (patch) | |
tree | 12f4475c878f26c4df8b576e9bc411c10ee7d886 /lib/VMCore | |
parent | d2a7bedbc9d3db35ff424a6a2d257c72341af224 (diff) | |
download | external_llvm-ebe18ef5c286bb7c33f6c43f1963a7d22cd73f40.zip external_llvm-ebe18ef5c286bb7c33f6c43f1963a7d22cd73f40.tar.gz external_llvm-ebe18ef5c286bb7c33f6c43f1963a7d22cd73f40.tar.bz2 |
Added Pass::createPass(ID) to handle pass configuration by ID
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150092 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Pass.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index 05d2efa..07ac3c3 100644 --- a/lib/VMCore/Pass.cpp +++ b/lib/VMCore/Pass.cpp @@ -189,6 +189,13 @@ const PassInfo *Pass::lookupPassInfo(StringRef Arg) { return PassRegistry::getPassRegistry()->getPassInfo(Arg); } +Pass *Pass::createPass(char &TI) { + const PassInfo *PI = PassRegistry::getPassRegistry()->getPassInfo(&TI); + if (!PI) + return NULL; + return PI->createPass(); +} + Pass *PassInfo::createPass() const { assert((!isAnalysisGroup() || NormalCtor) && "No default implementation found for analysis group!"); |