Inliner should not add callgraph edges for intrinsic calls (PR22857)
authorSanjay Patel <spatel@rotateright.com>
Wed, 11 Mar 2015 15:12:32 +0000 (15:12 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 11 Mar 2015 15:12:32 +0000 (15:12 +0000)
commitc2e42316272de143a2984835ef090e1af99d1ffa
treeac27839de1795cf726948532abef02f33da878ca
parent756a12d0d1c4259226a4ca8e77b3c6fcffe09cd0
Inliner should not add callgraph edges for intrinsic calls (PR22857)

The CallGraphNode function "addCalledFunction()" asserts that edges are not to intrinsics.

This patch makes sure that the Inliner does not add such an edge to the callgraph.

Fix for clang crash by assertion: https://llvm.org/bugs/show_bug.cgi?id=22857

Differential Revision: http://reviews.llvm.org/D8231

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231927 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/InlineFunction.cpp
test/Transforms/InstCombine/inline-intrinsic-assert.ll [new file with mode: 0644]