Set IgnoreLLVMUsed to false in CallGraph::addToCallGraph()
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 5 Apr 2021 20:01:44 +0000 (13:01 -0700)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Thu, 8 Apr 2021 18:14:09 +0000 (11:14 -0700)
commit5f0ac1ef78880f233dea2070ab55894c6bd2690c
tree14b5e01a234ee000d52b8a922e08e7e14050b236
parentc2e76a9a6dcc09434d47ba9217fa02d997c2401d
Set IgnoreLLVMUsed to false in CallGraph::addToCallGraph()

clang++ uses llvm.compiler.used in certain cases to preserve
symbol which is fully inlined. D96087 has resulted in undefined
symbols in such cases. Set it to false by default to preserve
old behavior but keep the option for specific uses where we
want to ignore these (e.g. to detect a potential indirect call
to a function).

Differential Revision: https://reviews.llvm.org/D99897
llvm/lib/Analysis/CallGraph.cpp
llvm/test/Analysis/CallGraph/llvm-used.ll [moved from llvm/test/Analysis/CallGraph/ignore-llvm-used.ll with 69% similarity]