aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-09-30 21:22:07 +0000
committerBill Wendling <isanbard@gmail.com>2008-09-30 21:22:07 +0000
commit5db7ffb9e537d06963e61e13ce267ecc7295045a (patch)
tree1c8e02946e9ac15065714bcc07bb0bdf38deb26c /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentff1ab062a51053954ae59f3ed7154d1b2e983c2b (diff)
downloadexternal_llvm-5db7ffb9e537d06963e61e13ce267ecc7295045a.zip
external_llvm-5db7ffb9e537d06963e61e13ce267ecc7295045a.tar.gz
external_llvm-5db7ffb9e537d06963e61e13ce267ecc7295045a.tar.bz2
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
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp8
1 files changed, 7 insertions, 1 deletions
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 <cmath>
using namespace llvm;
+static cl::opt<bool>
+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;