diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-09-30 21:22:07 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-09-30 21:22:07 +0000 |
commit | 6f287b22d2e57600b4cd5dc209d0d869e7736c0b (patch) | |
tree | 1c8e02946e9ac15065714bcc07bb0bdf38deb26c /lib/Target/X86/X86Subtarget.cpp | |
parent | 5ec9efd61bc4214c787287409498e8b78f28c922 (diff) |
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/Target/X86/X86Subtarget.cpp')
-rw-r--r-- | lib/Target/X86/X86Subtarget.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index a9fc05e6b6..3eb0e28aab 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -59,16 +59,14 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV, return false; } -/// This function returns the name of a function which has an interface -/// like the non-standard bzero function, if such a function exists on -/// the current subtarget and it is considered prefereable over -/// memset with zero passed as the second argument. Otherwise it -/// returns null. -const char *X86Subtarget::getBZeroEntry() const { - +/// getBZeroEntry - This function returns the name of a function which has an +/// interface like the non-standard bzero function, if such a function exists on +/// the current subtarget and it is considered prefereable over memset with zero +/// passed as the second argument. Otherwise it returns null. +const char *X86Subtarget::getBZeroEntry(bool NoBuiltin) const { // Darwin 10 has a __bzero entry point for this purpose. if (getDarwinVers() >= 10) - return "__bzero"; + return NoBuiltin ? "_bzero" : "__bzero"; return 0; } |