[llvm-commits] patch to make addCommonCodeGenPasses virtual

Heikki Kultala hkultala at iki.fi
Wed May 19 04:29:17 PDT 2010


Our backend(TCE) needs to add some custom passes in
addCommonCodeGenPasses, so we need our own version of that method in our
own TargetMachine implementation class.

However, as the addCommonCodeGenPasses was not virtual, it could not be called 
by the addPassesToEmitFile of LLVMTargetMachine, and we had to copy
the implementation of AddPassesToEmitFile to our TargetMachine class,
just to be able to call the correct addCommonCodeGenPasses class.

This patch just adds virtual keyword to definition of addCommonCodeGenPasses,
which allows us to get rid of extra redundant code in our backend, and should 
not harm anyone else in any way.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makeAddCommonCodeGenPassesVirtual.patch
Type: text/x-diff
Size: 659 bytes
Desc: 
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100519/c3548f6a/attachment.patch>


More information about the llvm-commits mailing list