Any way to use a pass in opt, that does not have normal constructor?

Dear LLVM,

The TargetData pass needs target data layout to be specified in
constructor, and therefore its normal ctor is defined, but always
gives a fatal error.
Still, is there any way to make it loadable into the opt tool? I need
this to make use of bugpoint in reducing backend test case.

- Dima.

Ah, OK, opt always creates add adds TargetData. So, we can simply
ignore its explicit inclusion:

--- a/llvm/tools/opt/opt.cpp (revision 156703)
+++ b/llvm/tools/opt/opt.cpp (working copy)
@@ -632,6 +632,8 @@

     const PassInfo *PassInf = PassList[i];
+ if (PassInf->isPassID(TD->getPassID()))
+ continue;
     Pass *P = 0;
     if (PassInf->getNormalCtor())
       P = PassInf->getNormalCtor()();