[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)
commitb67fc33fa586dbe6c3d0c5d5162e39eba00fd09b
tree5f3aa7a8e2f193d24c9eb2a51a47f225e975f049
parent4d569edd37897df7a614c689ed4f978fd8cb2d78
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226640 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/SimplifyLibCalls.h
lib/Transforms/InstCombine/InstructionCombining.cpp
lib/Transforms/Utils/SimplifyLibCalls.cpp