[LNT] r349113 - pep8 whitespace fixups
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 13 16:28:23 PST 2018
Author: cmatthews
Date: Thu Dec 13 16:28:22 2018
New Revision: 349113
URL: http://llvm.org/viewvc/llvm-project?rev=349113&view=rev
Log:
pep8 whitespace fixups
Modified:
lnt/trunk/lnt/util/stats.py
lnt/trunk/setup.py
lnt/trunk/tests/SharedInputs/FakeCompilers/fakecompiler.py
Modified: lnt/trunk/lnt/util/stats.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/util/stats.py?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- lnt/trunk/lnt/util/stats.py (original)
+++ lnt/trunk/lnt/util/stats.py Thu Dec 13 16:28:22 2018
@@ -23,7 +23,7 @@ def safe_max(values):
def mean(values):
if values:
- return sum(values)/len(values)
+ return sum(values) / len(values)
else:
return None
@@ -40,15 +40,15 @@ def agg_mean(pairs):
Output: (mean, 0), or (None, None) on invalid input.
"""
if not pairs:
- return (None, None)
+ return None, None
my_sum = 0.0
counter = 0
for item in pairs:
my_sum += item[0]
counter += 1
if counter > 0:
- return (my_sum / counter, 0)
- return (None, None)
+ return my_sum / counter, 0
+ return None, None
def median(values):
@@ -57,7 +57,7 @@ def median(values):
values = list(values)
values.sort()
N = len(values)
- return (values[(N-1)//2] + values[N//2])*.5
+ return (values[(N - 1) // 2] + values[N // 2]) * .5
def median_absolute_deviation(values, med=None):
@@ -68,7 +68,7 @@ def median_absolute_deviation(values, me
def standard_deviation(values):
m = mean(values)
- means_sqrd = sum([(v - m)**2 for v in values]) / len(values)
+ means_sqrd = sum([(v - m) ** 2 for v in values]) / len(values)
rms = math.sqrt(means_sqrd)
return rms
@@ -123,118 +123,118 @@ def mannwhitneyu_small(a, b, sigLevel):
# Table for .10 significance level.
TABLE_0_10 = [
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4],
- [0, 0, 0, 0, 1, 2, 2, 3, 4, 4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11],
- [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18],
- [0, 0, 1, 2, 4, 5, 6, 8, 9, 11, 12, 13, 15, 16, 18, 19, 20, 22, 23,
- 25],
- [0, 0, 2, 3, 5, 7, 8, 10, 12, 14, 16, 17, 19, 21, 23, 25, 26, 28, 30,
- 32],
- [0, 0, 2, 4, 6, 8, 11, 13, 15, 17, 19, 21, 24, 26, 28, 30, 33, 35, 37,
- 39],
- [0, 1, 3, 5, 8, 10, 13, 15, 18, 20, 23, 26, 28, 31, 33, 36, 39, 41, 44,
- 47],
- [0, 1, 4, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51,
- 54],
- [0, 1, 4, 7, 11, 14, 17, 20, 24, 27, 31, 34, 37, 41, 44, 48, 51, 55,
- 58, 62],
- [0, 1, 5, 8, 12, 16, 19, 23, 27, 31, 34, 38, 42, 46, 50, 54, 57, 61,
- 65, 69],
- [0, 2, 5, 9, 13, 17, 21, 26, 30, 34, 38, 42, 47, 51, 55, 60, 64, 68,
- 72, 77],
- [0, 2, 6, 10, 15, 19, 24, 28, 33, 37, 42, 47, 51, 56, 61, 65, 70, 75,
- 80, 89],
- [0, 3, 7, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 77, 82,
- 87, 92],
- [0, 3, 7, 12, 18, 23, 28, 33, 39, 44, 50, 55, 61, 66, 72, 77, 83, 88,
- 94, 100],
- [0, 3, 8, 14, 19, 25, 30, 36, 42, 48, 54, 60, 65, 71, 77, 83, 89, 95,
- 101, 107],
- [0, 3, 9, 15, 20, 26, 33, 39, 45, 51, 57, 64, 70, 77, 83, 89, 96, 102,
- 109, 115],
- [0, 4, 9, 16, 22, 28, 35, 41, 48, 55, 61, 68, 75, 82, 88, 95, 102, 109,
- 116, 123],
- [0, 4, 10, 17, 23, 30, 37, 44, 51, 58, 65, 72, 80, 87, 94, 101, 109,
- 116, 123, 130],
- [0, 4, 11, 18, 25, 32, 39, 47, 54, 62, 69, 77, 89, 92, 100, 107, 115,
- 123, 130, 138]
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4],
+ [0, 0, 0, 0, 1, 2, 2, 3, 4, 4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11],
+ [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18],
+ [0, 0, 1, 2, 4, 5, 6, 8, 9, 11, 12, 13, 15, 16, 18, 19, 20, 22, 23,
+ 25],
+ [0, 0, 2, 3, 5, 7, 8, 10, 12, 14, 16, 17, 19, 21, 23, 25, 26, 28, 30,
+ 32],
+ [0, 0, 2, 4, 6, 8, 11, 13, 15, 17, 19, 21, 24, 26, 28, 30, 33, 35, 37,
+ 39],
+ [0, 1, 3, 5, 8, 10, 13, 15, 18, 20, 23, 26, 28, 31, 33, 36, 39, 41, 44,
+ 47],
+ [0, 1, 4, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51,
+ 54],
+ [0, 1, 4, 7, 11, 14, 17, 20, 24, 27, 31, 34, 37, 41, 44, 48, 51, 55,
+ 58, 62],
+ [0, 1, 5, 8, 12, 16, 19, 23, 27, 31, 34, 38, 42, 46, 50, 54, 57, 61,
+ 65, 69],
+ [0, 2, 5, 9, 13, 17, 21, 26, 30, 34, 38, 42, 47, 51, 55, 60, 64, 68,
+ 72, 77],
+ [0, 2, 6, 10, 15, 19, 24, 28, 33, 37, 42, 47, 51, 56, 61, 65, 70, 75,
+ 80, 89],
+ [0, 3, 7, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 77, 82,
+ 87, 92],
+ [0, 3, 7, 12, 18, 23, 28, 33, 39, 44, 50, 55, 61, 66, 72, 77, 83, 88,
+ 94, 100],
+ [0, 3, 8, 14, 19, 25, 30, 36, 42, 48, 54, 60, 65, 71, 77, 83, 89, 95,
+ 101, 107],
+ [0, 3, 9, 15, 20, 26, 33, 39, 45, 51, 57, 64, 70, 77, 83, 89, 96, 102,
+ 109, 115],
+ [0, 4, 9, 16, 22, 28, 35, 41, 48, 55, 61, 68, 75, 82, 88, 95, 102, 109,
+ 116, 123],
+ [0, 4, 10, 17, 23, 30, 37, 44, 51, 58, 65, 72, 80, 87, 94, 101, 109,
+ 116, 123, 130],
+ [0, 4, 11, 18, 25, 32, 39, 47, 54, 62, 69, 77, 89, 92, 100, 107, 115,
+ 123, 130, 138]
]
# Table for .05 significance level.
TABLE_0_05 = [
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2],
- [0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8],
- [0, 0, 0, 0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 11, 11, 12, 13, 13],
- [0, 0, 0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 17, 18, 19, 20],
- [0, 0, 1, 2, 3, 5, 6, 8, 10, 11, 13, 14, 16, 17, 19, 21, 22, 24, 25,
- 27],
- [0, 0, 1, 3, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32,
- 34],
- [0, 0, 2, 4, 6, 8, 10, 13, 15, 17, 19, 22, 24, 26, 29, 31, 34, 36, 38,
- 41],
- [0, 0, 2, 4, 7, 10, 12, 15, 17, 20, 23, 26, 28, 31, 34, 37, 39, 42, 45,
- 48],
- [0, 0, 3, 5, 8, 11, 14, 17, 20, 23, 26, 29, 33, 36, 39, 42, 45, 48, 52,
- 55],
- [0, 0, 3, 6, 9, 13, 16, 19, 23, 26, 30, 33, 37, 40, 44, 47, 51, 55, 58,
- 62],
- [0, 1, 4, 7, 11, 14, 18, 22, 26, 29, 33, 37, 41, 45, 49, 53, 57, 61,
- 65, 69],
- [0, 1, 4, 8, 12, 16, 20, 24, 28, 33, 37, 41, 45, 50, 54, 59, 63, 67,
- 72, 76],
- [0, 1, 5, 9, 13, 17, 22, 26, 31, 36, 40, 45, 50, 55, 59, 64, 67, 74,
- 78, 83],
- [0, 1, 5, 10, 14, 19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 70, 75, 80,
- 85, 90],
- [0, 1, 6, 11, 15, 21, 26, 31, 37, 42, 47, 53, 59, 64, 70, 75, 81, 86,
- 92, 98],
- [0, 2, 6, 11, 17, 22, 28, 34, 39, 45, 51, 57, 63, 67, 75, 81, 87, 93,
- 99, 105],
- [0, 2, 7, 12, 18, 24, 30, 36, 42, 48, 55, 61, 67, 74, 80, 86, 93, 99,
- 106, 112],
- [0, 2, 7, 13, 19, 25, 32, 38, 45, 52, 58, 65, 72, 78, 85, 92, 99, 106,
- 113, 119],
- [0, 2, 8, 13, 20, 27, 34, 41, 48, 55, 62, 69, 76, 83, 90, 98, 105, 112,
- 119, 127]
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2],
+ [0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8],
+ [0, 0, 0, 0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 11, 11, 12, 13, 13],
+ [0, 0, 0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 17, 18, 19, 20],
+ [0, 0, 1, 2, 3, 5, 6, 8, 10, 11, 13, 14, 16, 17, 19, 21, 22, 24, 25,
+ 27],
+ [0, 0, 1, 3, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32,
+ 34],
+ [0, 0, 2, 4, 6, 8, 10, 13, 15, 17, 19, 22, 24, 26, 29, 31, 34, 36, 38,
+ 41],
+ [0, 0, 2, 4, 7, 10, 12, 15, 17, 20, 23, 26, 28, 31, 34, 37, 39, 42, 45,
+ 48],
+ [0, 0, 3, 5, 8, 11, 14, 17, 20, 23, 26, 29, 33, 36, 39, 42, 45, 48, 52,
+ 55],
+ [0, 0, 3, 6, 9, 13, 16, 19, 23, 26, 30, 33, 37, 40, 44, 47, 51, 55, 58,
+ 62],
+ [0, 1, 4, 7, 11, 14, 18, 22, 26, 29, 33, 37, 41, 45, 49, 53, 57, 61,
+ 65, 69],
+ [0, 1, 4, 8, 12, 16, 20, 24, 28, 33, 37, 41, 45, 50, 54, 59, 63, 67,
+ 72, 76],
+ [0, 1, 5, 9, 13, 17, 22, 26, 31, 36, 40, 45, 50, 55, 59, 64, 67, 74,
+ 78, 83],
+ [0, 1, 5, 10, 14, 19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 70, 75, 80,
+ 85, 90],
+ [0, 1, 6, 11, 15, 21, 26, 31, 37, 42, 47, 53, 59, 64, 70, 75, 81, 86,
+ 92, 98],
+ [0, 2, 6, 11, 17, 22, 28, 34, 39, 45, 51, 57, 63, 67, 75, 81, 87, 93,
+ 99, 105],
+ [0, 2, 7, 12, 18, 24, 30, 36, 42, 48, 55, 61, 67, 74, 80, 86, 93, 99,
+ 106, 112],
+ [0, 2, 7, 13, 19, 25, 32, 38, 45, 52, 58, 65, 72, 78, 85, 92, 99, 106,
+ 113, 119],
+ [0, 2, 8, 13, 20, 27, 34, 41, 48, 55, 62, 69, 76, 83, 90, 98, 105, 112,
+ 119, 127]
]
# Table for .01 significance level.
TABLE_0_01 = [
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3],
- [0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 8],
- [0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13],
- [0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 15, 16, 17, 18],
- [0, 0, 0, 0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24],
- [0, 0, 0, 1, 2, 4, 6, 7, 9, 11, 13, 15, 17, 18, 20, 22, 24, 26, 28,
- 30],
- [0, 0, 0, 1, 3, 5, 7, 9, 11, 13, 16, 18, 20, 22, 24, 27, 29, 31, 33,
- 36],
- [0, 0, 0, 2, 4, 6, 9, 11, 13, 16, 18, 21, 24, 26, 29, 31, 34, 37, 39,
- 42],
- [0, 0, 0, 2, 5, 7, 10, 13, 16, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45,
- 46],
- [0, 0, 1, 3, 6, 9, 12, 15, 18, 21, 24, 27, 31, 34, 37, 41, 44, 47, 51,
- 54],
- [0, 0, 1, 3, 7, 10, 13, 17, 20, 24, 27, 31, 34, 38, 42, 45, 49, 53, 56,
- 60],
- [0, 0, 1, 4, 7, 11, 15, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 63,
- 67],
- [0, 0, 2, 5, 8, 12, 16, 20, 24, 29, 33, 37, 42, 46, 51, 55, 60, 64, 69,
- 73],
- [0, 0, 2, 5, 9, 13, 18, 22, 27, 31, 36, 41, 45, 50, 55, 60, 65, 70, 74,
- 79],
- [0, 0, 2, 6, 10, 15, 19, 24, 29, 34, 39, 44, 49, 54, 60, 65, 70, 75,
- 81, 86],
- [0, 0, 2, 6, 11, 16, 21, 26, 31, 37, 42, 47, 53, 58, 64, 70, 75, 81,
- 87, 92],
- [0, 0, 3, 7, 12, 17, 22, 28, 33, 39, 45, 51, 56, 63, 69, 74, 81, 87,
- 93, 99],
- [0, 0, 3, 8, 13, 18, 24, 30, 36, 42, 46, 54, 60, 67, 73, 79, 86, 92,
- 99, 105]
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3],
+ [0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 8],
+ [0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13],
+ [0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 15, 16, 17, 18],
+ [0, 0, 0, 0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24],
+ [0, 0, 0, 1, 2, 4, 6, 7, 9, 11, 13, 15, 17, 18, 20, 22, 24, 26, 28,
+ 30],
+ [0, 0, 0, 1, 3, 5, 7, 9, 11, 13, 16, 18, 20, 22, 24, 27, 29, 31, 33,
+ 36],
+ [0, 0, 0, 2, 4, 6, 9, 11, 13, 16, 18, 21, 24, 26, 29, 31, 34, 37, 39,
+ 42],
+ [0, 0, 0, 2, 5, 7, 10, 13, 16, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45,
+ 46],
+ [0, 0, 1, 3, 6, 9, 12, 15, 18, 21, 24, 27, 31, 34, 37, 41, 44, 47, 51,
+ 54],
+ [0, 0, 1, 3, 7, 10, 13, 17, 20, 24, 27, 31, 34, 38, 42, 45, 49, 53, 56,
+ 60],
+ [0, 0, 1, 4, 7, 11, 15, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 63,
+ 67],
+ [0, 0, 2, 5, 8, 12, 16, 20, 24, 29, 33, 37, 42, 46, 51, 55, 60, 64, 69,
+ 73],
+ [0, 0, 2, 5, 9, 13, 18, 22, 27, 31, 36, 41, 45, 50, 55, 60, 65, 70, 74,
+ 79],
+ [0, 0, 2, 6, 10, 15, 19, 24, 29, 34, 39, 44, 49, 54, 60, 65, 70, 75,
+ 81, 86],
+ [0, 0, 2, 6, 11, 16, 21, 26, 31, 37, 42, 47, 53, 58, 64, 70, 75, 81,
+ 87, 92],
+ [0, 0, 3, 7, 12, 17, 22, 28, 33, 39, 45, 51, 56, 63, 69, 74, 81, 87,
+ 93, 99],
+ [0, 0, 3, 8, 13, 18, 24, 30, 36, 42, 46, 54, 60, 67, 73, 79, 86, 92,
+ 99, 105]
]
SIGN_TABLES = {.10: TABLE_0_10, .05: TABLE_0_05, .01: TABLE_0_01}
Modified: lnt/trunk/setup.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/setup.py?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- lnt/trunk/setup.py (original)
+++ lnt/trunk/setup.py Thu Dec 13 16:28:22 2018
@@ -92,7 +92,7 @@ http://llvm.org/svn/llvm-project/lnt/tru
'Programming Language :: Python',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Software Development :: Testing',
- ],
+ ],
zip_safe=False,
Modified: lnt/trunk/tests/SharedInputs/FakeCompilers/fakecompiler.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/SharedInputs/FakeCompilers/fakecompiler.py?rev=349113&r1=349112&r2=349113&view=diff
==============================================================================
--- lnt/trunk/tests/SharedInputs/FakeCompilers/fakecompiler.py (original)
+++ lnt/trunk/tests/SharedInputs/FakeCompilers/fakecompiler.py Thu Dec 13 16:28:22 2018
@@ -12,6 +12,7 @@ from optparse import OptionParser, Optio
g_program = None
+
class FakeCompiler(object):
compiler_name = None
@@ -25,15 +26,17 @@ class FakeCompiler(object):
raise NotImplementedError
def print_as_version(self):
- print >>sys.stderr, """(assembler version goes here)"""
+ print >> sys.stderr, """(assembler version goes here)"""
def print_ld_version(self):
- print >>sys.stderr, """(linker version goes here)"""
-
+ print >> sys.stderr, """(linker version goes here)"""
+
+
class ICCv12_1_3(FakeCompiler):
compiler_name = "icc-12.1.3"
+
def print_verbose_info(self):
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
icc: command line warning #10006: ignoring unknown option '-###'
icc version 12.1.3 (gcc version 4.2.1 compatibility)
/usr/bin/icc-2011-base/bin/intel64/mcpcom -_g -mP3OPT_inline_alloca -D__HONOR_STD -D__ICC=1210 -D__INTEL_COMPILER=1210 "-_Acpu(x86_64)" "-_Amachine(x86_64)" -D__BLOCKS__ -D__PTRDIFF_TYPE__=long "-D__SIZE_TYPE__=unsigned long" -D__WCHAR_TYPE__=int -D__WINT_TYPE__=int "-D__INTMAX_TYPE__=long int" "-D__UINTMAX_TYPE__=long unsigned int" -D__LONG_MAX__=9223372036854775807L -D__QMSPP_ -D__OPTIMIZE__ -D__NO_MATH_INLINES -D__NO_STRING_INLINES -D__NO_INLINE__ -D__GNUC_GNU_INLINE__ -D__GNUC__=4 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=1 -D__APPLE_CC__=5658 -D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1073 -D__LITTLE_ENDIAN__ -D__DYNAMIC__ "-D__private_extern__=__attribute__((visibility("hidden")))" -D__LP64__ -D_LP64 -D__GXX_ABI_VERSION=1002 -D__USER_LABEL_PREFIX__=_ -D__REGISTER_PREFIX__= -D__INTEL_RTTI__ -D__x86_64 -D__x86_64__ -D_MT -D__INTEL_COMPILER_BUILD_DATE=20120130 -D__PIC__ -D__APPLE__ -D__MACH__ -D__pentium4 -D__pentium4__ -D__tune_pentium4__ -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__SSE__ -D__MMX__ -_k -_8 -_l -_D -_a -_b -E --gnu_version=421 -_W5 --gcc-extern-inline --multibyte_chars --blocks --array_section --simd --simd_func -mP1OPT_print_version=FALSE -mP1OPT_version=12.1-intel64 -mGLOB_diag_use_message_catalog=FALSE /dev/null
@@ -52,6 +55,7 @@ icc: command line warning #10006: ignori
def print_dumpmachine(self):
print """i686-apple-darwin11"""
+
class LLVMCompiler(FakeCompiler):
def print_llvm_target(self, args):
target = "x86_64-apple-darwin11.0.0"
@@ -69,41 +73,44 @@ target triple = "%s"
def print_dumpmachine(self):
print """x86_64-apple-darwin11.0.0"""
+
# Clang build at r154331 (for example).
class Clang_r154331(LLVMCompiler):
compiler_name = "clang-r154331"
def print_verbose_info(self):
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
clang version 3.1 (trunk 154331) (llvm/trunk 154329)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
InstalledDir: /home/foo/bin
"""
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
"%s" "-cc1" "-E" ... more boring stuff here ...""" % (
g_program,)
+
class Clang_r154332(LLVMCompiler):
compiler_name = "clang-r154332"
def print_verbose_info(self):
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
clang version 3.1 (trunk 154332) (llvm/trunk 154329)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
InstalledDir: /home/foo/bin
"""
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
"%s" "-cc1" "-E" ... more boring stuff here ...""" % (
g_program,)
+
# Clang build from a git repository.
class Clang_git(LLVMCompiler):
compiler_name = "clang-git"
def print_verbose_info(self):
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
clang version 3.1\
(git:/git/clang.git 37ce0feee598d82e7220fa0a4b110619cae6ea72)\
(git:/git/llvm.git 60fca4f64e697ad834ce7ee8c2e478cae394c7dc)
@@ -111,71 +118,78 @@ Target: arm-apple-darwin11.4.0
Thread model: posix
InstalledDir: /home/foo/bin
"""
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
"%s" "-cc1" "-E" ... more boring stuff here ...""" % (
g_program,)
+
# Clang build from a git repository.
class Clang_git_2(LLVMCompiler):
compiler_name = "clang-git-2"
def print_verbose_info(self):
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
clang version 3.2\
(/d/g/pz/clang.git git:/git/pz/clang.git 8ab09316f63ea99ff23b2684c454b1008b8d5f10)\
(http://llvm.org/git/llvm.git /d/g/pz/llvm.git git:/git/pb/llvm.git 7c53f795961cc2d35b85d315aadb2ac135a0fdb2)
Target: x86_64-apple-darwin12.2.0
Thread model: posix"""
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
"%s" "-cc1" "-E" ... more boring stuff here ...""" % (
g_program,)
+
class AppleClang_138_1(LLVMCompiler):
compiler_name = "apple-clang-138.1"
def print_verbose_info(self):
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
Apple clang version 2.0 (tags/Apple/clang-138.1) (based on LLVM 2.9svn)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
InstalledDir: /home/foo/bin"""
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
"%s" "-cc1" "-E" ... more boring stuff here ...""" % (
g_program,)
+
fake_compilers = dict((value.compiler_name, value)
- for key,value in locals().items()
+ for key, value in locals().items()
if inspect.isclass(value) and \
- issubclass(value, FakeCompiler))
+ issubclass(value, FakeCompiler))
+
class ClangNoInfo(LLVMCompiler):
compiler_name = "clang-no-info"
def print_verbose_info(self):
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
clang version 3.2
Target: x86_64-bla-bla
Thread model: posix"""
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
"%s" "-cc1" "-E" ... more boring stuff here ...""" % (
g_program,)
+
class GenericLLVMCompiler(LLVMCompiler):
compiler_name = "llvm-compiler"
def print_verbose_info(self):
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
LLVM version 3.3 (git:/git/pz/clang.git 597522d740374f093a089a2acbec5b20466b2f34) (/d/g/pz/llvm git:/git/pz/llvm.git 6e95d969734af111bb33bcec0bcc27fd803a3b76)
Target: x86_64-apple-darwin12.3.0
Thread model: posix"""
- print >>sys.stderr, """\
+ print >> sys.stderr, """\
"%s" "-cc1" "-E" ... more boring stuff here ...""" % (
g_program,)
+
fake_compilers = dict((value.compiler_name, value)
- for key,value in locals().items()
+ for key, value in locals().items()
if inspect.isclass(value) and \
- issubclass(value, FakeCompiler))
+ issubclass(value, FakeCompiler))
+
def main():
global g_program
@@ -193,7 +207,7 @@ def main():
"""Return true if every element of tuple b is contained in
tuple a."""
return all([bi in a for bi in b])
-
+
# Search in the arguments to determine what kind of response to fake.
args = tuple(sys.argv[1:])
if '-dumpmachine' in args:
@@ -208,7 +222,8 @@ def main():
compiler_instance.print_llvm_target(args)
else:
raise SystemExit("unrecognized argument vector: %r" % (
- args,))
+ args,))
+
if __name__ == '__main__':
main()
More information about the llvm-commits
mailing list