From 63318ce9577dcb0be1015418689ce850b61d8ada Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 18 Feb 2013 23:17:48 +0000 Subject: [PATCH] Add a 'no-builtin' attribute if we do not want to simplify calls. llvm-svn: 175471 --- clang/lib/CodeGen/CGCall.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 6072f60..ed448cc 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -1016,6 +1016,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, if (CodeGenOpts.NoImplicitFloat) FuncAttrs.addAttribute(llvm::Attribute::NoImplicitFloat); + if (!CodeGenOpts.SimplifyLibCalls) + FuncAttrs.addAttribute("no-builtin"); + if (!TargetOpts.CPU.empty()) FuncAttrs.addAttribute("target-cpu", TargetOpts.CPU); -- 2.7.4