From 5db7ffb9e537d06963e61e13ce267ecc7295045a Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 30 Sep 2008 21:22:07 +0000 Subject: Add the new `-no-builtin' flag. This flag is meant to mimic the GCC `-fno-builtin' flag. Currently, it's used to replace "memset" with "_bzero" instead of "__bzero" on Darwin10+. This arguably violates the meaning of this flag, but is currently sufficient. The meaning of this flag should become more specific over time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56885 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp') diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 004fc4c..a9b99b1 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -29,6 +29,7 @@ #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/SetVector.h" @@ -40,6 +41,11 @@ #include using namespace llvm; +static cl::opt +NoBuiltin("no-builtin", + cl::desc("Don't recognize built-in functions that do not begin " + "with `__builtin_' as prefix")); + /// makeVTList - Return an instance of the SDVTList struct initialized with the /// specified members. static SDVTList makeVTList(const MVT *VTs, unsigned NumVTs) { @@ -3189,7 +3195,7 @@ SDValue SelectionDAG::getMemset(SDValue Chain, SDValue Dst, // code. If the target chooses to do this, this is the next best. SDValue Result = TLI.EmitTargetCodeForMemset(*this, Chain, Dst, Src, Size, Align, - DstSV, DstSVOff); + DstSV, DstSVOff, NoBuiltin); if (Result.getNode()) return Result; -- cgit v1.1