Re: [PATCH] D12633: Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] targets

2015-09-17 Thread Richard Barton via cfe-commits
richard.barton.arm added a comment.

Hi all

I am uncomfortable with this patch for a number of reasons. These macros seem 
to me to be defined by the ACLE as describing the behaviour of the combination 
of library and compiler. For example, the __STDC_IEC_599__ macro would need 
some standards compliance from the compiler in terms of optimisations on 
floating point functions, and from the libraries in terms of the behaviour of 
the fp functions there. Thus, I don't think it is safe for clang to define this 
macro for all ARM compilation regardless of which library is being used to link 
with. Perhaps I have misunderstood that one - so it would be worth running this 
past Tim directly as the __ARM_FP_FENV_ROUNDING definition comes from his 
original AArch64 patches from early 2013.

If I am right - then clang would want to adopt an approach similar to GCC's 
described here https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html 
(grep for __GCC_IEC_559) where the compiler sets a macro which presumably is 
read by a compliant c library header which then sets the ACLE macro.

However, there are multiple bug reports in the area of FP math - see 
https://llvm.org/bugs/show_bug.cgi?id=8100 - which makes me think that for 
Clang to really be ACLE compliant, we should not be defining any of these 
macros apart from __ARM_FP_FAST. Additionally a bit of research on the devs 
list suggest that LLVM does not support signaling NaNs e.g. 
http://lists.llvm.org/pipermail/llvm-dev/2014-April/071699.html and 
http://lists.llvm.org/pipermail/llvm-dev/2014-August/075749.html from last year

I suggest that the patch needs to be resubmitted without the setting of 
__ARM_FP_FENV_ROUNDING, __STDC_IEC_559 and __SUPPORT_SNAN, and that the setting 
of __ARM_FP_FENV_ROUNDING in the aarch64 target be clarified.


http://reviews.llvm.org/D12633



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D12633: Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] targets

2015-09-21 Thread Richard Barton via cfe-commits
richard.barton.arm added a comment.

Yes - I would be interested in knowing the rationale behind the original 
AArch64 setting of __ARM_FP_FPENV_ROUNDING.

I also question whether our pre-conditions for __ARM_FP_FAST are sufficient. 
There are many -f... options relating to maths operations, are these two the 
only ones that might not preserve the order of operations? I think clang ought 
to take a conservative stance when setting these flags.


http://reviews.llvm.org/D12633



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D12633: Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] targets

2015-09-24 Thread Richard Barton via cfe-commits
richard.barton.arm added inline comments.


Comment at: lib/Frontend/CompilerInvocation.cpp:1711
@@ -1710,1 +1710,3 @@
   Args.hasArg(OPT_cl_fast_relaxed_math);
+  Opts.UnsafeFPMath = Args.hasArg(OPT_menable_unsafe_fp_math) ||
+  Args.hasArg(OPT_cl_unsafe_math_optimizations) ||

What happens if I do -menable-unsafe-fp-math then -mno-enable-unsafe-fp-math? I 
don't think you have enough regression tests.


http://reviews.llvm.org/D12633



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D12633: Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] targets

2015-09-24 Thread Richard Barton via cfe-commits
richard.barton.arm added a comment.

In the overall approach, whilst this is the pragmatic approach to get the job 
done, it clearly takes liberties with the definition of LangOpt as this your 
new flag is most certainly a CodeGenOpt rather than a LangOpt. I'd like to see 
what the others say as I don't see a better solution.



Comment at: lib/Frontend/CompilerInvocation.cpp:1711
@@ -1710,1 +1710,3 @@
   Args.hasArg(OPT_cl_fast_relaxed_math);
+  Opts.UnsafeFPMath = Args.hasArg(OPT_menable_unsafe_fp_math) ||
+  Args.hasArg(OPT_cl_unsafe_math_optimizations) ||

labrinea wrote:
> richard.barton.arm wrote:
> > What happens if I do -menable-unsafe-fp-math then 
> > -mno-enable-unsafe-fp-math? I don't think you have enough regression tests.
> Well there is no such flag (-mno-enable-unsafe-fp-math) but probably what you 
> want to say is that the order of the front-end flags matters. In 
> **llvm/tools/clang/test/Driver/fast-math.c** there are tests checking whether 
> "-menable-unsafe-fp-math" is correctly set depending on the order of the 
> front-end flags. I could modify my tests so that they pass cc1 flags. Then we 
> would be checking if _ARM_FP_FAST gets defined in the presence of 
> "-menable-unsafe-fp-math". Would that be preferable?
Ok - I did not realise that by this point in the code we know this has been 
taken care of. If that argument processing is already covered by tests then 
there is no need to add more and I retract my suggestion.


http://reviews.llvm.org/D12633



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D12633: Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] targets

2015-10-02 Thread Richard Barton via cfe-commits
richard.barton.arm added a comment.

What do you think about this Renato? Although Alexandros has added a LangOption 
which is strictly speaking to do with CodeGen rather than Lang, I think this is 
the only pragmatica way to do this without needing re-engineering work to 
expose the codegen options to this phase in clang.

Are you and I able to make the call to let Alexandros commit, or do you think 
we ought to seek guidance from elsewhere? Do you have an idea who we could go 
to?


http://reviews.llvm.org/D12633



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D13497: Silence warning from lit about missing clang-interpreter

2015-10-07 Thread Richard Barton via cfe-commits
richard.barton.arm abandoned this revision.
richard.barton.arm added a comment.

Adandoning and starting again with cfe-commits as subscriber.


http://reviews.llvm.org/D13497



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D13498: Silence spurious warning from lit about missing clang-interpreter

2015-10-07 Thread Richard Barton via cfe-commits
richard.barton.arm created this revision.
richard.barton.arm added reviewers: ddunbar, rafael.
richard.barton.arm added a subscriber: cfe-commits.

Clang's lit.cfg checks for the presence of a few test binaries, including the 
clang-interpreter. This binary is only built if building the clang examples, so 
the check should also only fire if the clang examples are built.

http://reviews.llvm.org/D13498

Files:
  test/lit.cfg

Index: test/lit.cfg
===
--- test/lit.cfg
+++ test/lit.cfg
@@ -308,17 +308,21 @@
 NoPostHyphenDot = r"(?!(-|\.))"
 NoPostBar = r"(?!(/|\\))"
 
-for pattern in [r"\bFileCheck\b",
-r"\bc-index-test\b",
-NoPreHyphenDot + r"\bclang-check\b" + NoPostHyphenDot,
-NoPreHyphenDot + r"\bclang-format\b" + NoPostHyphenDot,
-NoPreHyphenDot + r"\bclang-interpreter\b" + NoPostHyphenDot,
-# FIXME: Some clang test uses opt?
-NoPreHyphenDot + r"\bopt\b" + NoPostBar + NoPostHyphenDot,
-# Handle these specially as they are strings searched
-# for during testing.
-r"\| \bcount\b",
-r"\| \bnot\b"]:
+tool_patterns = [r"\bFileCheck\b",
+ r"\bc-index-test\b",
+ NoPreHyphenDot + r"\bclang-check\b" + NoPostHyphenDot,
+ NoPreHyphenDot + r"\bclang-format\b" + NoPostHyphenDot,
+ # FIXME: Some clang test uses opt?
+ NoPreHyphenDot + r"\bopt\b" + NoPostBar + NoPostHyphenDot,
+ # Handle these specially as they are strings searched
+ # for during testing.
+ r"\| \bcount\b",
+ r"\| \bnot\b"]
+
+if config.clang_examples:
+tool_patterns.append(NoPreHyphenDot + r"\bclang-interpreter\b" + 
NoPostHyphenDot)
+
+for pattern in tool_patterns:
 # Extract the tool name from the pattern.  This relies on the tool
 # name being surrounded by \b word match operators.  If the
 # pattern starts with "| ", include it in the string to be


Index: test/lit.cfg
===
--- test/lit.cfg
+++ test/lit.cfg
@@ -308,17 +308,21 @@
 NoPostHyphenDot = r"(?!(-|\.))"
 NoPostBar = r"(?!(/|\\))"
 
-for pattern in [r"\bFileCheck\b",
-r"\bc-index-test\b",
-NoPreHyphenDot + r"\bclang-check\b" + NoPostHyphenDot,
-NoPreHyphenDot + r"\bclang-format\b" + NoPostHyphenDot,
-NoPreHyphenDot + r"\bclang-interpreter\b" + NoPostHyphenDot,
-# FIXME: Some clang test uses opt?
-NoPreHyphenDot + r"\bopt\b" + NoPostBar + NoPostHyphenDot,
-# Handle these specially as they are strings searched
-# for during testing.
-r"\| \bcount\b",
-r"\| \bnot\b"]:
+tool_patterns = [r"\bFileCheck\b",
+ r"\bc-index-test\b",
+ NoPreHyphenDot + r"\bclang-check\b" + NoPostHyphenDot,
+ NoPreHyphenDot + r"\bclang-format\b" + NoPostHyphenDot,
+ # FIXME: Some clang test uses opt?
+ NoPreHyphenDot + r"\bopt\b" + NoPostBar + NoPostHyphenDot,
+ # Handle these specially as they are strings searched
+ # for during testing.
+ r"\| \bcount\b",
+ r"\| \bnot\b"]
+
+if config.clang_examples:
+tool_patterns.append(NoPreHyphenDot + r"\bclang-interpreter\b" + NoPostHyphenDot)
+
+for pattern in tool_patterns:
 # Extract the tool name from the pattern.  This relies on the tool
 # name being surrounded by \b word match operators.  If the
 # pattern starts with "| ", include it in the string to be
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D13499: Convert test to take input from stdin rather than reading a file

2015-10-07 Thread Richard Barton via cfe-commits
richard.barton.arm created this revision.
richard.barton.arm added a reviewer: ABataev.
richard.barton.arm added a subscriber: cfe-commits.
Herald added a subscriber: aemerson.

This test takes input from a file rather than from stdin and then goes on to 
check for a label "bar". This could match something on the file path (guess 
what my uname at ARM is...) causing the test to fail.

This patch converts the test to take from stdin instead.

http://reviews.llvm.org/D13499

Files:
  test/OpenMP/for_simd_codegen.cpp

Index: test/OpenMP/for_simd_codegen.cpp
===
--- test/OpenMP/for_simd_codegen.cpp
+++ test/OpenMP/for_simd_codegen.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown 
-emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
-// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown 
-fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions 
-fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | 
FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions 
-fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s 
--check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown 
-emit-llvm -fexceptions -fcxx-exceptions -o - < %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown 
-fexceptions -fcxx-exceptions -emit-pch -o %t < %s
+// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions 
-fcxx-exceptions -g -std=c++11 -include-pch %t -verify -emit-llvm -o - < %s | 
FileCheck %s
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions 
-fcxx-exceptions -gline-tables-only -x c++ -emit-llvm -o - < %s | FileCheck %s 
--check-prefix=TERM_DEBUG
 // REQUIRES: x86-registered-target
 // expected-no-diagnostics
 #ifndef HEADER


Index: test/OpenMP/for_simd_codegen.cpp
===
--- test/OpenMP/for_simd_codegen.cpp
+++ test/OpenMP/for_simd_codegen.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
-// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm -fexceptions -fcxx-exceptions -o - < %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t < %s
+// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify -emit-llvm -o - < %s | FileCheck %s
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions -fcxx-exceptions -gline-tables-only -x c++ -emit-llvm -o - < %s | FileCheck %s --check-prefix=TERM_DEBUG
 // REQUIRES: x86-registered-target
 // expected-no-diagnostics
 #ifndef HEADER
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D13496: Convert test to take input from stdin rather than reading a file

2015-10-07 Thread Richard Barton via cfe-commits
richard.barton.arm abandoned this revision.
richard.barton.arm added a comment.

Abandoning as I forgot to add cfe-commits.


http://reviews.llvm.org/D13496



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D13500: Improve helpfulness of assert message when number of diagnostics overflows number of available enum values.

2015-10-07 Thread Richard Barton via cfe-commits
richard.barton.arm created this revision.
richard.barton.arm added a reviewer: rafael.
richard.barton.arm added a subscriber: cfe-commits.

There are two asserts that can trigger if the number of diagnostic messages in a
kind overflows the number of available enums values. The one that fires if you
exceed this limit by one is helpful. The one that fires if you exceed it by 
more than
one is not as helpful. Combining the two makes sense I think.

http://reviews.llvm.org/D13500

Files:
  lib/Basic/DiagnosticIDs.cpp

Index: lib/Basic/DiagnosticIDs.cpp
===
--- lib/Basic/DiagnosticIDs.cpp
+++ lib/Basic/DiagnosticIDs.cpp
@@ -101,12 +101,9 @@
   static bool IsFirst = true; // So the check is only performed on first call.
   if (IsFirst) {
 for (unsigned i = 1; i != StaticDiagInfoSize; ++i) {
-  assert(StaticDiagInfo[i-1].DiagID != StaticDiagInfo[i].DiagID &&
+  assert(StaticDiagInfo[i-1].DiagID < StaticDiagInfo[i].DiagID &&
  "Diag ID conflict, the enums at the start of clang::diag (in "
  "DiagnosticIDs.h) probably need to be increased");
-
-  assert(StaticDiagInfo[i-1] < StaticDiagInfo[i] &&
- "Improperly sorted diag info");
 }
 IsFirst = false;
   }


Index: lib/Basic/DiagnosticIDs.cpp
===
--- lib/Basic/DiagnosticIDs.cpp
+++ lib/Basic/DiagnosticIDs.cpp
@@ -101,12 +101,9 @@
   static bool IsFirst = true; // So the check is only performed on first call.
   if (IsFirst) {
 for (unsigned i = 1; i != StaticDiagInfoSize; ++i) {
-  assert(StaticDiagInfo[i-1].DiagID != StaticDiagInfo[i].DiagID &&
+  assert(StaticDiagInfo[i-1].DiagID < StaticDiagInfo[i].DiagID &&
  "Diag ID conflict, the enums at the start of clang::diag (in "
  "DiagnosticIDs.h) probably need to be increased");
-
-  assert(StaticDiagInfo[i-1] < StaticDiagInfo[i] &&
- "Improperly sorted diag info");
 }
 IsFirst = false;
   }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D13495: Improve the helpfulness of an assert message

2015-10-07 Thread Richard Barton via cfe-commits
richard.barton.arm abandoned this revision.
richard.barton.arm added a comment.

Abandoning as cfe-commits was not on subscribers


http://reviews.llvm.org/D13495



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r249535 - Make the test take input from stdin to prevent matching characters in a file path

2015-10-07 Thread Richard Barton via cfe-commits
Author: rbarton
Date: Wed Oct  7 05:33:36 2015
New Revision: 249535

URL: http://llvm.org/viewvc/llvm-project?rev=249535&view=rev
Log:
Make the test take input from stdin to prevent matching characters in a file 
path

Modified:
cfe/trunk/test/OpenMP/for_simd_codegen.cpp

Modified: cfe/trunk/test/OpenMP/for_simd_codegen.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_codegen.cpp?rev=249535&r1=249534&r2=249535&view=diff
==
--- cfe/trunk/test/OpenMP/for_simd_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_codegen.cpp Wed Oct  7 05:33:36 2015
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown 
-emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
-// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown 
-fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions 
-fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | 
FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions 
-fcxx-exceptions -gline-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s 
--check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown 
-emit-llvm -fexceptions -fcxx-exceptions -o - < %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown 
-fexceptions -fcxx-exceptions -emit-pch -o %t < %s
+// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions 
-fcxx-exceptions -g -std=c++11 -include-pch %t -verify -emit-llvm -o - < %s | 
FileCheck %s
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions 
-fcxx-exceptions -gline-tables-only -x c++ -emit-llvm -o - < %s | FileCheck %s 
--check-prefix=TERM_DEBUG
 // REQUIRES: x86-registered-target
 // expected-no-diagnostics
 #ifndef HEADER


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r249538 - Silence warning about not being able to find clang-interpreter

2015-10-07 Thread Richard Barton via cfe-commits
Author: rbarton
Date: Wed Oct  7 06:14:25 2015
New Revision: 249538

URL: http://llvm.org/viewvc/llvm-project?rev=249538&view=rev
Log:
Silence warning about not being able to find clang-interpreter

This binary is only built with the examples project, so only require it then.

Modified:
cfe/trunk/test/lit.cfg

Modified: cfe/trunk/test/lit.cfg
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=249538&r1=249537&r2=249538&view=diff
==
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Wed Oct  7 06:14:25 2015
@@ -308,17 +308,21 @@ NoPreHyphenDot = r"(?http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r250546 - Further increase helfulness of assert message

2015-10-16 Thread Richard Barton via cfe-commits
Author: rbarton
Date: Fri Oct 16 15:15:29 2015
New Revision: 250546

URL: http://llvm.org/viewvc/llvm-project?rev=250546&view=rev
Log:
Further increase helfulness of assert message

If you increase the number of diags of a particular type by one more than the
number available you get the nice assert message. If you do it by two more
than available you get the old non-helpful message. Combining the two makes
sense I think.

Modified:
cfe/trunk/lib/Basic/DiagnosticIDs.cpp

Modified: cfe/trunk/lib/Basic/DiagnosticIDs.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/DiagnosticIDs.cpp?rev=250546&r1=250545&r2=250546&view=diff
==
--- cfe/trunk/lib/Basic/DiagnosticIDs.cpp (original)
+++ cfe/trunk/lib/Basic/DiagnosticIDs.cpp Fri Oct 16 15:15:29 2015
@@ -101,12 +101,9 @@ static const StaticDiagInfoRec *GetDiagI
   static bool IsFirst = true; // So the check is only performed on first call.
   if (IsFirst) {
 for (unsigned i = 1; i != StaticDiagInfoSize; ++i) {
-  assert(StaticDiagInfo[i-1].DiagID != StaticDiagInfo[i].DiagID &&
+  assert(StaticDiagInfo[i-1] < StaticDiagInfo[i] &&
  "Diag ID conflict, the enums at the start of clang::diag (in "
  "DiagnosticIDs.h) probably need to be increased");
-
-  assert(StaticDiagInfo[i-1] < StaticDiagInfo[i] &&
- "Improperly sorted diag info");
 }
 IsFirst = false;
   }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r250547 - Once again fix this test to read from stdin rather than an input file

2015-10-16 Thread Richard Barton via cfe-commits
Author: rbarton
Date: Fri Oct 16 15:15:33 2015
New Revision: 250547

URL: http://llvm.org/viewvc/llvm-project?rev=250547&view=rev
Log:
Once again fix this test to read from stdin rather than an input file

Modified:
cfe/trunk/test/OpenMP/for_simd_codegen.cpp

Modified: cfe/trunk/test/OpenMP/for_simd_codegen.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_codegen.cpp?rev=250547&r1=250546&r2=250547&view=diff
==
--- cfe/trunk/test/OpenMP/for_simd_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_codegen.cpp Fri Oct 16 15:15:33 2015
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown 
-emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
-// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown 
-fexceptions -fcxx-exceptions -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions 
-fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s 
-emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions 
-fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | 
FileCheck %s --check-prefix=TERM_DEBUG
+// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown 
-emit-llvm -fexceptions -fcxx-exceptions -o - < %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown 
-fexceptions -fcxx-exceptions -emit-pch -o %t < %s
+// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions 
-fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify 
-emit-llvm -o - < %s | FileCheck %s
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fexceptions 
-fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm -o - < %s 
| FileCheck %s --check-prefix=TERM_DEBUG
 // REQUIRES: x86-registered-target
 // expected-no-diagnostics
 #ifndef HEADER


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D13500: Improve helpfulness of assert message when number of diagnostics overflows number of available enum values.

2015-10-16 Thread Richard Barton via cfe-commits
richard.barton.arm closed this revision.
richard.barton.arm added a comment.

Committed as r250546 with the suggested change.


http://reviews.llvm.org/D13500



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D13930: Fix __ARM_FP value for sp-only FPUs with Half-precision

2015-10-21 Thread Richard Barton via cfe-commits
richard.barton.arm created this revision.
richard.barton.arm added reviewers: labrinea, rengolin.
richard.barton.arm added a subscriber: cfe-commits.
Herald added subscribers: rengolin, aemerson.

The logic for parsing FP capabilities to set __ARM_FP was mistakenly removing
the Half-Precision capability when handling fp-only-sp resulting in a value
of 0x4. Section 6.5.1 of ACLE states that for such FP architectures the value
hould be 0x6


http://reviews.llvm.org/D13930

Files:
  lib/Basic/Targets.cpp
  test/Preprocessor/arm-acle-6.5.c
  test/Preprocessor/arm-target-features.c

Index: test/Preprocessor/arm-target-features.c
===
--- test/Preprocessor/arm-target-features.c
+++ test/Preprocessor/arm-target-features.c
@@ -1,46 +1,52 @@
-// RUN: %clang -target armv8a-none-linux-gnu -x c -E -dM %s -o - | FileCheck %s
-// CHECK: __ARMEL__ 1
-// CHECK: __ARM_ARCH 8
-// CHECK: __ARM_ARCH_8A__ 1
-// CHECK: __ARM_FEATURE_CRC32 1
-// CHECK: __ARM_FEATURE_DIRECTED_ROUNDING 1
-// CHECK: __ARM_FEATURE_NUMERIC_MAXMIN 1
-// CHECK: __ARM_FP16_ARGS 1
-// CHECK: __ARM_FP16_FORMAT_IEEE 1
+// RUN: %clang -target armv8a-none-linux-gnu -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V8A %s
+// CHECK-V8A: __ARMEL__ 1
+// CHECK-V8A: __ARM_ARCH 8
+// CHECK-V8A: __ARM_ARCH_8A__ 1
+// CHECK-V8A: __ARM_FEATURE_CRC32 1
+// CHECK-V8A: __ARM_FEATURE_DIRECTED_ROUNDING 1
+// CHECK-V8A: __ARM_FEATURE_NUMERIC_MAXMIN 1
+// CHECK-V8A: __ARM_FP 0xE
+// CHECK-V8A: __ARM_FP16_ARGS 1
+// CHECK-V8A: __ARM_FP16_FORMAT_IEEE 1
 
 // RUN: %clang -target armv7a-none-linux-gnu -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V7 %s
 // CHECK-V7: __ARMEL__ 1
 // CHECK-V7: __ARM_ARCH 7
 // CHECK-V7: __ARM_ARCH_7A__ 1
 // CHECK-V7-NOT: __ARM_FEATURE_CRC32
 // CHECK-V7-NOT: __ARM_FEATURE_NUMERIC_MAXMIN   
 // CHECK-V7-NOT: __ARM_FEATURE_DIRECTED_ROUNDING
+// CHECK-V7: __ARM_FP 0xC
 
 // RUN: %clang -target x86_64-apple-macosx10.10 -arch armv7s -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-V7S %s
 // CHECK-V7S: __ARMEL__ 1
 // CHECK-V7S: __ARM_ARCH 7
 // CHECK-V7S: __ARM_ARCH_7S__ 1
 // CHECK-V7S-NOT: __ARM_FEATURE_CRC32
 // CHECK-V7S-NOT: __ARM_FEATURE_NUMERIC_MAXMIN
 // CHECK-V7S-NOT: __ARM_FEATURE_DIRECTED_ROUNDING
+// CHECK-V7S: __ARM_FP 0xE
 
 // RUN: %clang -target armv8a -mfloat-abi=hard -x c -E -dM %s | FileCheck --check-prefix=CHECK-V8-BAREHF %s
 // CHECK-V8-BAREHF: __ARMEL__ 1
 // CHECK-V8-BAREHF: __ARM_ARCH 8
 // CHECK-V8-BAREHF: __ARM_ARCH_8A__ 1
 // CHECK-V8-BAREHF: __ARM_FEATURE_CRC32 1
 // CHECK-V8-BAREHF: __ARM_FEATURE_DIRECTED_ROUNDING 1
 // CHECK-V8-BAREHF: __ARM_FEATURE_NUMERIC_MAXMIN 1
+// CHECK-V8-BAREHP: __ARM_FP 0xE
 // CHECK-V8-BAREHF: __ARM_NEON__ 1
 // CHECK-V8-BAREHF: __ARM_PCS_VFP 1
 // CHECK-V8-BAREHF: __VFP_FP__ 1
 
 // RUN: %clang -target armv8a -mfloat-abi=hard -mfpu=fp-armv8 -x c -E -dM %s | FileCheck --check-prefix=CHECK-V8-BAREHF-FP %s
 // CHECK-V8-BAREHF-FP-NOT: __ARM_NEON__ 1
+// CHECK-V8-BAREHP-FP: __ARM_FP 0xE
 // CHECK-V8-BAREHF-FP: __VFP_FP__ 1
 
 // RUN: %clang -target armv8a -mfloat-abi=hard -mfpu=neon-fp-armv8 -x c -E -dM %s | FileCheck --check-prefix=CHECK-V8-BAREHF-NEON-FP %s
 // RUN: %clang -target armv8a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 -x c -E -dM %s | FileCheck --check-prefix=CHECK-V8-BAREHF-NEON-FP %s
+// CHECK-V8-BAREHP-NEON-FP: __ARM_FP 0xE
 // CHECK-V8-BAREHF-NEON-FP: __ARM_NEON__ 1
 // CHECK-V8-BAREHF-NEON-FP: __VFP_FP__ 1
 
@@ -75,15 +81,19 @@
 
 // RUN: %clang -target armv8a -x c -E -dM %s -o - | FileCheck --check-prefix=ARMV8A %s
 // ARMV8A:#define __ARM_ARCH_EXT_IDIV__ 1
+// ARMV8A: #define __ARM_FP 0xE
 
 // RUN: %clang -target armv8a -mthumb -x c -E -dM %s -o - | FileCheck --check-prefix=THUMBV8A %s
 // THUMBV8A:#define __ARM_ARCH_EXT_IDIV__ 1
+// THUMBV8A: #define __ARM_FP 0xE
 
 // RUN: %clang -target armv8a-eabi -x c -E -dM %s -o - | FileCheck --check-prefix=ARMV8A-EABI %s
 // ARMV8A-EABI:#define __ARM_ARCH_EXT_IDIV__ 1
+// ARMV8A-EABI: #define __ARM_FP 0xE
 
 // RUN: %clang -target armv8a-eabi -x c -E -dM %s -o - | FileCheck --check-prefix=THUMBV8A-EABI %s
 // THUMBV8A-EABI:#define __ARM_ARCH_EXT_IDIV__ 1
+// THUMBV8A-EABI: #define __ARM_FP 0xE
 
 // RUN: %clang -target arm-none-linux-gnu -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-DEFS %s
 // CHECK-DEFS:#define __ARM_PCS 1
@@ -132,52 +142,62 @@
 // Check that -mfpu works properly for Cortex-A7 (enabled by default).
 // RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A7 %s
 // RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A7 %s
+// DEFAULTFPU-A7:#define __ARM_FP 0xE
 // DEFAULTFPU-A7:#define __ARM_NEON__ 1
 // DEFAULTFPU-A7:#define __ARM_VFPV4__ 1
 
 // RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a7 -mfpu=none -x c -E -dM %s -o - | FileCheck --check-prefi

r250888 - Fix __ARM_FP value for sp-only FPUs with Half-precision

2015-10-21 Thread Richard Barton via cfe-commits
Author: rbarton
Date: Wed Oct 21 05:03:55 2015
New Revision: 250888

URL: http://llvm.org/viewvc/llvm-project?rev=250888&view=rev
Log:
Fix __ARM_FP value for sp-only FPUs with Half-precision

The logic for parsing FP capabilities to set __ARM_FP was mistakenly removing
the Half-Precision capability when handling fp-only-sp resulting in a value
of 0x4. Section 6.5.1 of ACLE states that for such FP architectures the value
should be 0x6

Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/Preprocessor/arm-acle-6.5.c
cfe/trunk/test/Preprocessor/arm-target-features.c

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=250888&r1=250887&r2=250888&view=diff
==
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Wed Oct 21 05:03:55 2015
@@ -4529,7 +4529,7 @@ public:
   } else if (Feature == "+t2dsp") {
 DSP = 1;
   } else if (Feature == "+fp-only-sp") {
-HW_FP_remove |= HW_FP_DP | HW_FP_HP;
+HW_FP_remove |= HW_FP_DP; 
   } else if (Feature == "+strict-align") {
 Unaligned = 0;
   } else if (Feature == "+fp16") {

Modified: cfe/trunk/test/Preprocessor/arm-acle-6.5.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/arm-acle-6.5.c?rev=250888&r1=250887&r2=250888&view=diff
==
--- cfe/trunk/test/Preprocessor/arm-acle-6.5.c (original)
+++ cfe/trunk/test/Preprocessor/arm-acle-6.5.c Wed Oct 21 05:03:55 2015
@@ -7,12 +7,15 @@
 
 // CHECK-NO-FP-NOT: __ARM_FP 0x{{.*}}
 
-// RUN: %clang -target arm-eabi -mfpu=vfpv3xd -x c -E -dM %s -o - | FileCheck 
%s -check-prefix CHECK-SP
-// RUN: %clang -target arm-eabi -mfpu=vfpv3xd-fp16 -x c -E -dM %s -o - | 
FileCheck %s -check-prefix CHECK-SP
-// RUN: %clang -target arm-eabi -mfpu=fpv4-sp-d16 -x c -E -dM %s -o - | 
FileCheck %s -check-prefix CHECK-SP
-// RUN: %clang -target arm-eabi -mfpu=fpv5-sp-d16 -x c -E -dM %s -o - | 
FileCheck %s -check-prefix CHECK-SP
+// RUN: %clang -target arm-eabi -mfpu=vfpv3xd -x c -E -dM %s -o - | FileCheck 
%s -check-prefix CHECK-SP-ONLY
 
-// CHECK-SP: __ARM_FP 0x4
+// CHECK-SP-ONLY: __ARM_FP 0x4
+
+// RUN: %clang -target arm-eabi -mfpu=vfpv3xd-fp16 -x c -E -dM %s -o - | 
FileCheck %s -check-prefix CHECK-SP-HP
+// RUN: %clang -target arm-eabi -mfpu=fpv4-sp-d16 -x c -E -dM %s -o - | 
FileCheck %s -check-prefix CHECK-SP-HP
+// RUN: %clang -target arm-eabi -mfpu=fpv5-sp-d16 -x c -E -dM %s -o - | 
FileCheck %s -check-prefix CHECK-SP-HP
+
+// CHECK-SP-HP: __ARM_FP 0x6
 
 // RUN: %clang -target arm-eabi -mfpu=vfp -x c -E -dM %s -o - | FileCheck %s 
-check-prefix CHECK-SP-DP
 // RUN: %clang -target arm-eabi -mfpu=vfpv2 -x c -E -dM %s -o - | FileCheck %s 
-check-prefix CHECK-SP-DP

Modified: cfe/trunk/test/Preprocessor/arm-target-features.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/arm-target-features.c?rev=250888&r1=250887&r2=250888&view=diff
==
--- cfe/trunk/test/Preprocessor/arm-target-features.c (original)
+++ cfe/trunk/test/Preprocessor/arm-target-features.c Wed Oct 21 05:03:55 2015
@@ -1,12 +1,13 @@
-// RUN: %clang -target armv8a-none-linux-gnu -x c -E -dM %s -o - | FileCheck %s
-// CHECK: __ARMEL__ 1
-// CHECK: __ARM_ARCH 8
-// CHECK: __ARM_ARCH_8A__ 1
-// CHECK: __ARM_FEATURE_CRC32 1
-// CHECK: __ARM_FEATURE_DIRECTED_ROUNDING 1
-// CHECK: __ARM_FEATURE_NUMERIC_MAXMIN 1
-// CHECK: __ARM_FP16_ARGS 1
-// CHECK: __ARM_FP16_FORMAT_IEEE 1
+// RUN: %clang -target armv8a-none-linux-gnu -x c -E -dM %s -o - | FileCheck 
--check-prefix=CHECK-V8A %s
+// CHECK-V8A: __ARMEL__ 1
+// CHECK-V8A: __ARM_ARCH 8
+// CHECK-V8A: __ARM_ARCH_8A__ 1
+// CHECK-V8A: __ARM_FEATURE_CRC32 1
+// CHECK-V8A: __ARM_FEATURE_DIRECTED_ROUNDING 1
+// CHECK-V8A: __ARM_FEATURE_NUMERIC_MAXMIN 1
+// CHECK-V8A: __ARM_FP 0xE
+// CHECK-V8A: __ARM_FP16_ARGS 1
+// CHECK-V8A: __ARM_FP16_FORMAT_IEEE 1
 
 // RUN: %clang -target armv7a-none-linux-gnu -x c -E -dM %s -o - | FileCheck 
--check-prefix=CHECK-V7 %s
 // CHECK-V7: __ARMEL__ 1
@@ -15,6 +16,7 @@
 // CHECK-V7-NOT: __ARM_FEATURE_CRC32
 // CHECK-V7-NOT: __ARM_FEATURE_NUMERIC_MAXMIN  
 
 // CHECK-V7-NOT: __ARM_FEATURE_DIRECTED_ROUNDING
+// CHECK-V7: __ARM_FP 0xC
 
 // RUN: %clang -target x86_64-apple-macosx10.10 -arch armv7s -x c -E -dM %s -o 
- | FileCheck --check-prefix=CHECK-V7S %s
 // CHECK-V7S: __ARMEL__ 1
@@ -23,6 +25,7 @@
 // CHECK-V7S-NOT: __ARM_FEATURE_CRC32
 // CHECK-V7S-NOT: __ARM_FEATURE_NUMERIC_MAXMIN
 // CHECK-V7S-NOT: __ARM_FEATURE_DIRECTED_ROUNDING
+// CHECK-V7S: __ARM_FP 0xE
 
 // RUN: %clang -target armv8a -mfloat-abi=hard -x c -E -dM %s | FileCheck 
--check-prefix=CHECK-V8-BAREHF %s
 // CHECK-V8-BAREHF: __ARMEL__ 1
@@ -31,16 +34,19 @@
 // CHECK-V8-BAREHF: __ARM_FEATURE_C

Re: [PATCH] D13930: Fix __ARM_FP value for sp-only FPUs with Half-precision

2015-10-21 Thread Richard Barton via cfe-commits
richard.barton.arm closed this revision.
richard.barton.arm added a comment.

Committed as r250888


http://reviews.llvm.org/D13930



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D22272: ARM: define __ARM_VFPV5__ when present.

2016-07-13 Thread Richard Barton via cfe-commits
richard.barton.arm added a subscriber: richard.barton.arm.
richard.barton.arm added a comment.

Hi all

At first glance I thought this would be something that is in the ACLE, so was 
going to give an opinion. On second look, this is not actually an ACLE macro, 
and seems to be a clang special - my arm-none-eabi-gcc 5.4.2 does not emit it. 
I think it would be best to use the right names in all circumstances, although 
I appreciate the situation has not been made easy by ARM giving two names to 
the same thing. If that approach is not practical, then Tim's patch is probably 
ok.

The thinking behind not having this in the ACLE by the way is that ACLE now 
tries to define feature test macros per architectural feature rather than 
generationally. The one exception is the `__ARM_ARCH` macro and it would not be 
practical to describe all the changes between e.g. ARMv7 and ARMv8 via 
individual macros. Given that, the meaning of this macro can be expressed by 
combining the `__ARM_ARCH`, `__ARM_FP` and `__ARM_FEATURE_FMA` macros to pick 
between VFPv2,VFPv3,...,FP-ARMv8.


http://reviews.llvm.org/D22272



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D15283: [ARMv8-M] Add Clang targeting for ARMv8-M Baseline/Mainline

2016-03-03 Thread Richard Barton via cfe-commits
richard.barton.arm added a subscriber: richard.barton.arm.
richard.barton.arm added a comment.

Hi Bradley

This matches the GCC targeting options:
https://sourceware.org/ml/binutils/2015-12/msg00295.html
https://sourceware.org/ml/binutils/2015-12/msg00296.html

The code changes LGTM. I think as this patch has been available since late 
January enough time has passed for others to comment. So you should commit.


Repository:
  rL LLVM

http://reviews.llvm.org/D15283



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D18347: [PATCH] Fix thread_annotation negtest for thread safety.

2016-03-22 Thread Richard Barton via cfe-commits
richard.barton.arm created this revision.
richard.barton.arm added reviewers: EricWF, jamesr.
richard.barton.arm added a subscriber: cfe-commits.

Although not testing the annotations feature, the test still needs guarding for 
thread-safety otherwise it will not compile at all.

http://reviews.llvm.org/D18347

Files:
  test/libcxx/t

Index: test/libcxx/t
===
--- test/libcxx/t
+++ test/libcxx/t
@@ -7,6 +7,8 @@
 //
 
//===--===//
 
+// REQUIRES: thread-safety
+
 // 
 
 // This test does not define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS so it


Index: test/libcxx/t
===
--- test/libcxx/t
+++ test/libcxx/t
@@ -7,6 +7,8 @@
 //
 //===--===//
 
+// REQUIRES: thread-safety
+
 // 
 
 // This test does not define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS so it
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18347: [PATCH] Fix thread_annotation negtest for thread safety.

2016-03-22 Thread Richard Barton via cfe-commits
richard.barton.arm updated this revision to Diff 51316.
richard.barton.arm added a comment.

Sorry - not sure what happened there. That looks better for me.


http://reviews.llvm.org/D18347

Files:
  test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp

Index: 
test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
===
--- 
test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
+++ 
test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
@@ -7,6 +7,8 @@
 //
 
//===--===//
 
+// REQUIRES: thread-safety
+
 // 
 
 // This test does not define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS so it


Index: test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
===
--- test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
+++ test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
@@ -7,6 +7,8 @@
 //
 //===--===//
 
+// REQUIRES: thread-safety
+
 // 
 
 // This test does not define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS so it
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18347: [PATCH] Fix thread_annotation negtest for thread safety.

2016-03-22 Thread Richard Barton via cfe-commits
richard.barton.arm added a comment.

Hi Eric

Sorry for the delay - I originally detected the failure while not running in a 
totally clean environment with clean sources, but I can reproduce on clean code.

I can reproduce by building with clean clang and libcxx sources:
cmake -DLLVM_PATH=/work/ricbar01/llvm_oss/ -DLIBCXX_CXX_ABI=libcxxabi 
-DLIBCXX_CXX_ABI_INCLUDE_PATHS=../../libcxxabi_oss/include 
-DCMAKE_C_COMPILER=/work/ricbar01/llvm_oss/build/bin/clang 
-DCMAKE_CXX_COMPILER=/work/ricbar01/llvm_oss/build/bin/clang++ 
-DLIBCXX_ENABLE_THREADS=OFF -DLIBCXX_ENABLE_SHARED=OFF 
-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF ..

I get errors like:
/work/ricbar01/libcxx_oss/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp:21:8:
 error: no type named 'mutex' in namespace 'std'

  std::mutex m;

From eyeballing the include/mutex it looks like the mutex class is #ifdeffec 
out when _LIBCPP_HAS_NO_THREADS is unset.


http://reviews.llvm.org/D18347



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18347: [PATCH] Fix thread_annotation negtest for thread safety.

2016-03-22 Thread Richard Barton via cfe-commits
richard.barton.arm added a comment.

Thanks for the help Eric. I'm just running a new patch now will put the new 
patch up when I get back in to office tomorrow.


http://reviews.llvm.org/D18347



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D18347: [PATCH] Fix thread_annotation negtest for thread safety.

2016-03-23 Thread Richard Barton via cfe-commits
richard.barton.arm updated this revision to Diff 51409.
richard.barton.arm added a comment.

My local run with no threads works with this updated patch.


http://reviews.llvm.org/D18347

Files:
  test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
  test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
  test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
  test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
  test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
  test/std/thread/futures/futures.promise/copy_assign.fail.cpp
  test/std/thread/futures/futures.promise/copy_ctor.fail.cpp
  test/std/thread/futures/futures.tas/futures.task.members/assign_copy.fail.cpp
  test/std/thread/futures/futures.tas/futures.task.members/ctor1.fail.cpp
  test/std/thread/futures/futures.tas/futures.task.members/ctor2.fail.cpp
  test/std/thread/futures/futures.tas/futures.task.members/ctor_copy.fail.cpp
  test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp
  test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp
  
test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/assign.fail.cpp
  
test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/copy.fail.cpp

Index: test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/copy.fail.cpp
===
--- test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/copy.fail.cpp
+++ test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/copy.fail.cpp
@@ -7,6 +7,7 @@
 //
 //===--===//
 //
+// UNSUPPORTED: libcpp-has-no-threads
 // UNSUPPORTED: c++98, c++03, c++11, c++14
 
 // 
Index: test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/assign.fail.cpp
===
--- test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/assign.fail.cpp
+++ test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/assign.fail.cpp
@@ -7,6 +7,7 @@
 //
 //===--===//
 //
+// UNSUPPORTED: libcpp-has-no-threads
 // UNSUPPORTED: c++98, c++03, c++11, c++14
 
 // 
Index: test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp
===
--- test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp
+++ test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp
@@ -6,6 +6,8 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===--===//
+//
+// UNSUPPORTED: libcpp-has-no-threads
 
 // 
 
Index: test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp
===
--- test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp
+++ test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp
@@ -6,6 +6,8 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===--===//
+//
+// UNSUPPORTED: libcpp-has-no-threads
 
 // 
 
Index: test/std/thread/futures/futures.tas/futures.task.members/ctor_copy.fail.cpp
===
--- test/std/thread/futures/futures.tas/futures.task.members/ctor_copy.fail.cpp
+++ test/std/thread/futures/futures.tas/futures.task.members/ctor_copy.fail.cpp
@@ -6,7 +6,8 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===--===//
-
+//
+// UNSUPPORTED: libcpp-has-no-threads
 // UNSUPPORTED: c++98, c++03
 
 // 
Index: test/std/thread/futures/futures.tas/futures.task.members/ctor2.fail.cpp
===
--- test/std/thread/futures/futures.tas/futures.task.members/ctor2.fail.cpp
+++ test/std/thread/futures/futures.tas/futures.task.members/ctor2.fail.cpp
@@ -6,7 +6,8 @@
 // Source Licenses. See LICENSE.TXT for details.
 //
 //===--===//
-
+//
+// UNSUPPORTED: libcpp-has-no-threads
 // UNSUPPORTED: c++98, c++03
 
 // 
Index: test/std/thread/futures/futures.tas/futures.task.members/ctor1.fail.cpp
===
--- test/std/thread/futures/futures.tas/futures.task.members/ctor1.fail.cpp
+++ 

[libcxx] r264191 - Guard a number of tests relying on threads support when built in

2016-03-23 Thread Richard Barton via cfe-commits
Author: rbarton
Date: Wed Mar 23 16:04:11 2016
New Revision: 264191

URL: http://llvm.org/viewvc/llvm-project?rev=264191&view=rev
Log:
Guard a number of tests relying on threads support when built in
single-threaded mode.

Differential Revision: http://reviews.llvm.org/D14731


Modified:

libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp

libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp

libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp

libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp

libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
libcxx/trunk/test/std/thread/futures/futures.promise/copy_assign.fail.cpp
libcxx/trunk/test/std/thread/futures/futures.promise/copy_ctor.fail.cpp

libcxx/trunk/test/std/thread/futures/futures.tas/futures.task.members/assign_copy.fail.cpp

libcxx/trunk/test/std/thread/futures/futures.tas/futures.task.members/ctor1.fail.cpp

libcxx/trunk/test/std/thread/futures/futures.tas/futures.task.members/ctor2.fail.cpp

libcxx/trunk/test/std/thread/futures/futures.tas/futures.task.members/ctor_copy.fail.cpp

libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_assign.fail.cpp

libcxx/trunk/test/std/thread/futures/futures.unique_future/copy_ctor.fail.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/assign.fail.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/copy.fail.cpp

Modified: 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp?rev=264191&r1=264190&r2=264191&view=diff
==
--- 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
 (original)
+++ 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
 Wed Mar 23 16:04:11 2016
@@ -7,6 +7,8 @@
 //
 
//===--===//
 
+// UNSUPPORTED: libcpp-has-no-threads
+
 // 
 
 // This test does not define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS so it

Modified: 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp?rev=264191&r1=264190&r2=264191&view=diff
==
--- 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp 
(original)
+++ 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp 
Wed Mar 23 16:04:11 2016
@@ -7,6 +7,7 @@
 //
 
//===--===//
 
+// UNSUPPORTED: libcpp-has-no-threads
 // REQUIRES: thread-safety
 
 // 

Modified: 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp?rev=264191&r1=264190&r2=264191&view=diff
==
--- 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp 
(original)
+++ 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp 
Wed Mar 23 16:04:11 2016
@@ -7,6 +7,7 @@
 //
 
//===--===//
 
+// UNSUPPORTED: libcpp-has-no-threads
 // REQUIRES: thread-safety
 
 // 

Modified: 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp?rev=264191&r1=264190&r2=264191&view=diff
==
--- 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
 (original)
+++ 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
 Wed Mar 23 16:04:11 2016
@@ -7,6 +7,7 @@
 //
 
//===--===//
 
+// UNSUPPORTED: libcpp-has-no-threads
 // REQUIRES: thread-safety
 
 // 

Modified: 
libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp?rev=264191&r1=264190&r2=264191&view=diff
===

Re: [PATCH] D18347: [PATCH] Fix thread_annotation negtest for thread safety.

2016-03-23 Thread Richard Barton via cfe-commits
richard.barton.arm added a comment.

Hi Eric - no problem at all, you practically wrote it for me after all ;-)


http://reviews.llvm.org/D18347



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits