Skip to content
Commit 304378fd authored by Jonas Paulsson's avatar Jonas Paulsson
Browse files

Reapply "[BuildLibCalls] Introduce getOrInsertLibFunc() for use when building

libcalls." (was 0f8c6267). This reverts commit 14d93907.

The patch previously failed to recognize cases where user had defined a
function alias with an identical name as that of the library
function. Module::getFunction() would then return nullptr which is what the
sanitizer discovered.

In this updated version a new function isLibFuncEmittable() has as well been
introduced which is now used instead of TLI->has() anytime a library function
is to be emitted . It additionally also makes sure there is e.g. no function
alias with the same name in the module.

Reviewed By: Eli Friedman

Differential Revision: https://reviews.llvm.org/D123198
parent c685f821
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment