aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/CallGraph.cpp
diff options
context:
space:
mode:
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2021-04-05 13:01:44 -0700
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2021-04-08 11:14:09 -0700
commit5f0ac1ef78880f233dea2070ab55894c6bd2690c (patch)
tree14b5e01a234ee000d52b8a922e08e7e14050b236 /llvm/lib/Analysis/CallGraph.cpp
parentc2e76a9a6dcc09434d47ba9217fa02d997c2401d (diff)
downloadllvm-5f0ac1ef78880f233dea2070ab55894c6bd2690c.zip
llvm-5f0ac1ef78880f233dea2070ab55894c6bd2690c.tar.gz
llvm-5f0ac1ef78880f233dea2070ab55894c6bd2690c.tar.bz2
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
Diffstat (limited to 'llvm/lib/Analysis/CallGraph.cpp')
-rw-r--r--llvm/lib/Analysis/CallGraph.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/CallGraph.cpp b/llvm/lib/Analysis/CallGraph.cpp
index bca4567..dfbd29b 100644
--- a/llvm/lib/Analysis/CallGraph.cpp
+++ b/llvm/lib/Analysis/CallGraph.cpp
@@ -82,7 +82,7 @@ void CallGraph::addToCallGraph(Function *F) {
if (!F->hasLocalLinkage() ||
F->hasAddressTaken(nullptr, /*IgnoreCallbackUses=*/true,
/* IgnoreAssumeLikeCalls */ true,
- /* IgnoreLLVMUsed */ true))
+ /* IgnoreLLVMUsed */ false))
ExternalCallingNode->addCalledFunction(nullptr, Node);
populateCallGraphNode(Node);