Add new helper template function
authorChris Lattner <sabre@nondot.org>
Tue, 25 Feb 2003 00:00:50 +0000 (00:00 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 25 Feb 2003 00:00:50 +0000 (00:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5622 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/PassSupport.h

index 62fdf265eb08f22975f3495256e7a78396fc9ae0..08cc59c761d7799e94c65cb09647930553cc8405 100644 (file)
@@ -171,6 +171,8 @@ protected:
 
 template<typename PassName>
 Pass *callDefaultCtor() { return new PassName(); }
+template<typename PassName>
+Pass *callTargetDataCtor(const TargetData &TD) { return new PassName(TD); }
 
 template<typename PassName>
 struct RegisterPass : public RegisterPassBase {