Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: lib/Target/TargetLibraryInfo.cpp

Issue 7730004: add llvm configure flags to enable/disable target OSes/Envs Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===-- TargetLibraryInfo.cpp - Runtime library information ----------------==// 1 //===-- TargetLibraryInfo.cpp - Runtime library information ----------------==//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file implements the TargetLibraryInfo class. 10 // This file implements the TargetLibraryInfo class.
(...skipping 13 matching lines...) Expand all
24 /// specified target triple. This should be carefully written so that a missing 24 /// specified target triple. This should be carefully written so that a missing
25 /// target triple gets a sane set of defaults. 25 /// target triple gets a sane set of defaults.
26 static void initialize(TargetLibraryInfo &TLI, const Triple &T) { 26 static void initialize(TargetLibraryInfo &TLI, const Triple &T) {
27 initializeTargetLibraryInfoPass(*PassRegistry::getPassRegistry()); 27 initializeTargetLibraryInfoPass(*PassRegistry::getPassRegistry());
28 28
29 29
30 // memset_pattern16 is only available on iOS 3.0 and Mac OS/X 10.5 and later. 30 // memset_pattern16 is only available on iOS 3.0 and Mac OS/X 10.5 and later.
31 if (T.isMacOSX()) { 31 if (T.isMacOSX()) {
32 if (T.isMacOSXVersionLT(10, 5)) 32 if (T.isMacOSXVersionLT(10, 5))
33 TLI.setUnavailable(LibFunc::memset_pattern16); 33 TLI.setUnavailable(LibFunc::memset_pattern16);
34 } else if (T.getOS() == Triple::IOS) { 34 } else if (T.isOSIOS()) {
35 if (T.isOSVersionLT(3, 0)) 35 if (T.isOSVersionLT(3, 0))
36 TLI.setUnavailable(LibFunc::memset_pattern16); 36 TLI.setUnavailable(LibFunc::memset_pattern16);
37 } else { 37 } else {
38 TLI.setUnavailable(LibFunc::memset_pattern16); 38 TLI.setUnavailable(LibFunc::memset_pattern16);
39 } 39 }
40 40
41 // iprintf and friends are only available on XCore and TCE. 41 // iprintf and friends are only available on XCore and TCE.
42 if (T.getArch() != Triple::xcore && T.getArch() != Triple::tce) { 42 if (T.getArch() != Triple::xcore && T.getArch() != Triple::tce) {
43 TLI.setUnavailable(LibFunc::iprintf); 43 TLI.setUnavailable(LibFunc::iprintf);
44 TLI.setUnavailable(LibFunc::siprintf); 44 TLI.setUnavailable(LibFunc::siprintf);
(...skipping 20 matching lines...) Expand all
65 : ImmutablePass(ID) { 65 : ImmutablePass(ID) {
66 memcpy(AvailableArray, TLI.AvailableArray, sizeof(AvailableArray)); 66 memcpy(AvailableArray, TLI.AvailableArray, sizeof(AvailableArray));
67 } 67 }
68 68
69 69
70 /// disableAllFunctions - This disables all builtins, which is used for options 70 /// disableAllFunctions - This disables all builtins, which is used for options
71 /// like -fno-builtin. 71 /// like -fno-builtin.
72 void TargetLibraryInfo::disableAllFunctions() { 72 void TargetLibraryInfo::disableAllFunctions() {
73 memset(AvailableArray, 0, sizeof(AvailableArray)); 73 memset(AvailableArray, 0, sizeof(AvailableArray));
74 } 74 }
OLDNEW
« no previous file with comments | « lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp ('k') | lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698