aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorserge-sans-paille <sguelton@redhat.com>2021-03-08 14:46:25 +0100
committerserge-sans-paille <sguelton@redhat.com>2021-03-10 09:18:55 +0100
commitea8e5b87acba4b7dad749d697a3969901652b97a (patch)
tree9c36fbb9c48fb834c8a651a62d35d75c8ce1f0ea /clang/lib/CodeGen/CGCall.cpp
parent8080ea4c4b8c456c72c617587cc32f174b3105c1 (diff)
downloadllvm-ea8e5b87acba4b7dad749d697a3969901652b97a.zip
llvm-ea8e5b87acba4b7dad749d697a3969901652b97a.tar.gz
llvm-ea8e5b87acba4b7dad749d697a3969901652b97a.tar.bz2
[NFC] Remove duplicate isNoBuiltinFunc method
It's available both in CodeGenOptions and in LangOptions, and LangOptions implementation is slightly better as it uses a StringRef instead of a char pointer, so use it. Differential Revision: https://reviews.llvm.org/D98175
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index da993be..34ad782 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -1765,8 +1765,7 @@ void CodeGenModule::getDefaultFunctionAttributes(StringRef Name,
if (AttrOnCallSite) {
// Attributes that should go on the call site only.
- if (!CodeGenOpts.SimplifyLibCalls ||
- CodeGenOpts.isNoBuiltinFunc(Name.data()))
+ if (!CodeGenOpts.SimplifyLibCalls || LangOpts.isNoBuiltinFunc(Name))
FuncAttrs.addAttribute(llvm::Attribute::NoBuiltin);
if (!CodeGenOpts.TrapFuncName.empty())
FuncAttrs.addAttribute("trap-func-name", CodeGenOpts.TrapFuncName);