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 | bd09262e97e8a04433eaad72151478bdb4ae3f58 (patch) | |
tree | 95692913b554d03f528d4286d9dd370e8402b06d /llvm/lib/Target/X86/X86Subtarget.cpp | |
parent | 123e7d1c2a8d04d43d146b55d1b6ef716ac3f526 (diff) | |
download | bcm5719-llvm-bd09262e97e8a04433eaad72151478bdb4ae3f58.tar.gz bcm5719-llvm-bd09262e97e8a04433eaad72151478bdb4ae3f58.zip |
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.
llvm-svn: 56885
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp index a9fc05e6b66..3eb0e28aab4 100644 --- a/llvm/lib/Target/X86/X86Subtarget.cpp +++ b/llvm/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; } |