[PM] Replace an abuse of inheritance to override a single function with
authorChandler Carruth <chandlerc@gmail.com>
Wed, 21 Jan 2015 02:11:59 +0000 (02:11 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 21 Jan 2015 02:11:59 +0000 (02:11 +0000)
commit9280382ac6f023efd009c99c0b522a9edbeb6152
tree5f4172c13b8dd98b03c2465312ff77acd1ba02b3
parent82b58712c119a2d0ab354cac0c3d80554bd3e741
[PM] Replace an abuse of inheritance to override a single function with
a more direct approach: a type-erased glorified function pointer. Now we
can pass a function pointer into this for the easy case and we can even
pass a lambda into it in the interesting case in the instruction
combiner.

I'll be using this shortly to simplify the interfaces to InstCombiner,
but this helps pave the way and seems like a better design for the
libcall simplifier utility.

llvm-svn: 226640
llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp