Skip to content
Snippets Groups Projects
Commit d6a7da5a authored by Augie Fackler's avatar Augie Fackler
Browse files

MemoryBuiltins: only claim an allocator family on builtin functions

This lines up with other parts of the codebase that only use special
knowledge about allocator functions if they're builtins.

Differential Revision: https://reviews.llvm.org/D123053
parent b9164140
No related branches found
No related tags found
No related merge requests found
......@@ -492,7 +492,7 @@ Optional<StringRef> llvm::getAllocationFamily(const Value *I,
const TargetLibraryInfo *TLI) {
bool IsNoBuiltin;
const Function *Callee = getCalledFunction(I, IsNoBuiltin);
if (Callee == nullptr)
if (Callee == nullptr || IsNoBuiltin)
return None;
LibFunc TLIFn;
if (!TLI || !TLI->getLibFunc(*Callee, TLIFn) || !TLI->has(TLIFn))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment