aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-02-25 00:00:50 +0000
committerChris Lattner <sabre@nondot.org>2003-02-25 00:00:50 +0000
commitf288ff77747579b82b56fb875673a6383ba4ca2e (patch)
tree0d9ec06b9e2b31803498143c2d3a9007e7d8a267
parentbe677588a32f32efc6ad18b80961fbf8d6c47de3 (diff)
Add new helper template function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5622 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/PassSupport.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/PassSupport.h b/include/llvm/PassSupport.h
index 62fdf265eb..08cc59c761 100644
--- a/include/llvm/PassSupport.h
+++ b/include/llvm/PassSupport.h
@@ -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 {