[llvm-commits] [llvm] r129803 - /llvm/trunk/lib/Target/TargetLibraryInfo.cpp
Daniel Dunbar
daniel at zuster.org
Tue Apr 19 13:44:08 PDT 2011
Author: ddunbar
Date: Tue Apr 19 15:44:08 2011
New Revision: 129803
URL: http://llvm.org/viewvc/llvm-project?rev=129803&view=rev
Log:
Target: Eliminate a use of getDarwinMajorNumber().
Modified:
llvm/trunk/lib/Target/TargetLibraryInfo.cpp
Modified: llvm/trunk/lib/Target/TargetLibraryInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLibraryInfo.cpp?rev=129803&r1=129802&r2=129803&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetLibraryInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetLibraryInfo.cpp Tue Apr 19 15:44:08 2011
@@ -28,8 +28,15 @@
// memset_pattern16 is only available on iOS 3.0 and Mac OS/X 10.5 and later.
- if (T.getOS() != Triple::Darwin || T.getDarwinMajorNumber() < 9)
+ if (T.isOSX()) {
+ if (T.isOSXVersionLT(10, 5))
+ TLI.setUnavailable(LibFunc::memset_pattern16);
+ } else if (T.getOS() == Triple::IOS) {
+ if (T.isOSVersionLT(3, 0))
+ TLI.setUnavailable(LibFunc::memset_pattern16);
+ } else {
TLI.setUnavailable(LibFunc::memset_pattern16);
+ }
// iprintf and friends are only available on XCore.
if (T.getArch() != Triple::xcore) {
More information about the llvm-commits
mailing list