Index: clang/include/clang/Basic/CodeGenOptions.h =================================================================== --- clang/include/clang/Basic/CodeGenOptions.h +++ clang/include/clang/Basic/CodeGenOptions.h @@ -415,10 +415,6 @@ CodeGenOptions(); - /// Is this a libc/libm function that is no longer recognized as a - /// builtin because a -fno-builtin-* option has been specified? - bool isNoBuiltinFunc(const char *Name) const; - const std::vector &getNoBuiltinFuncs() const { return NoBuiltinFuncs; } Index: clang/lib/Basic/CodeGenOptions.cpp =================================================================== --- clang/lib/Basic/CodeGenOptions.cpp +++ clang/lib/Basic/CodeGenOptions.cpp @@ -20,12 +20,4 @@ memcpy(CoverageVersion, "408*", 4); } -bool CodeGenOptions::isNoBuiltinFunc(const char *Name) const { - StringRef FuncName(Name); - for (unsigned i = 0, e = NoBuiltinFuncs.size(); i != e; ++i) - if (FuncName.equals(NoBuiltinFuncs[i])) - return true; - return false; -} - } // end namespace clang Index: clang/lib/CodeGen/CGCall.cpp =================================================================== --- clang/lib/CodeGen/CGCall.cpp +++ clang/lib/CodeGen/CGCall.cpp @@ -1765,8 +1765,7 @@ 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);