[PM] Remove the IRUnitT typedef requirement for analysis passes.
authorChandler Carruth <chandlerc@gmail.com>
Fri, 22 Nov 2013 11:46:33 +0000 (11:46 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 22 Nov 2013 11:46:33 +0000 (11:46 +0000)
commitd984cdc17ea0b2b8aa638b512eb27059721d9662
tree2fabf137dbf36481dcdce50ce3f043bac1fd936a
parent3f081983cc79cdb16a83ac01e2ea04697bd8b892
[PM] Remove the IRUnitT typedef requirement for analysis passes.

Since the analysis managers were split into explicit function and module
analysis managers, it is now completely trivial to specify this when
building up the concept and model types explicitly, and it is impossible
to end up with a type error at run time. We instantiate a template when
registering a pass that will enforce the requirement at a type-system
level, and we produce a dynamic error on all the other query paths to
the analysis manager if the pass in question isn't registered.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195447 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/PassManager.h
unittests/IR/PassManagerTest.cpp