r244110 - Remove unnecessary ClangLibdirSuffix variable.

2015-08-05 Thread Yaron Keren
Author: yrnkrn
Date: Wed Aug  5 15:06:56 2015
New Revision: 244110

URL: http://llvm.org/viewvc/llvm-project?rev=244110&view=rev
Log:
Remove unnecessary ClangLibdirSuffix variable. 
Twine + const char * is supported.


Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=244110&r1=244109&r2=244110&view=diff
==
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Wed Aug  5 15:06:56 2015
@@ -1085,13 +1085,11 @@ std::string CompilerInvocation::GetResou
   // Compute the path to the resource directory.
   StringRef ClangResourceDir(CLANG_RESOURCE_DIR);
   SmallString<128> P(Dir);
-  if (ClangResourceDir != "") {
+  if (ClangResourceDir != "")
 llvm::sys::path::append(P, ClangResourceDir);
-  } else {
-StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX);
-llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang",
-CLANG_VERSION_STRING);
-  }
+  else
+llvm::sys::path::append(P, "..", Twine("lib") + CLANG_LIBDIR_SUFFIX,
+"clang", CLANG_VERSION_STRING);
 
   return P.str();
 }


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


Re: r304346 - [modules] When compiling a preprocessed module map, look for headers relative

2017-06-01 Thread Yaron Keren via cfe-commits
Hi Richard,

This broke the tests on the Windows bot:

http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/5266

   1. FAIL: Clang::preprocess-nested.cpp
   

   2. FAIL: Clang::preprocess-module.cpp
   


r304345 was OK
http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/5265

Yaron


‫בתאריך יום ד׳, 31 במאי 2017 ב-23:57 מאת ‪Richard Smith via cfe-commits‬‏ <‪
cfe-commits@lists.llvm.org‬‏>:‬

> Author: rsmith
> Date: Wed May 31 15:56:55 2017
> New Revision: 304346
>
> URL: http://llvm.org/viewvc/llvm-project?rev=304346&view=rev
> Log:
> [modules] When compiling a preprocessed module map, look for headers
> relative
> to the original module map.
>
> Also use the path and name of the original module map when emitting that
> information into the .pcm file. The upshot of this is that the produced
> .pcm
> file will track information for headers in their original locations (where
> the
> module was preprocessed), not relative to whatever directory the
> preprocessed
> module map was in when it was built.
>
> Modified:
> cfe/trunk/include/clang/Basic/Module.h
> cfe/trunk/include/clang/Lex/HeaderSearch.h
> cfe/trunk/lib/Frontend/FrontendAction.cpp
> cfe/trunk/lib/Lex/HeaderSearch.cpp
> cfe/trunk/lib/Serialization/ASTWriter.cpp
> cfe/trunk/test/Modules/preprocess-module.cpp
> cfe/trunk/test/Modules/preprocess-nested.cpp
>
> Modified: cfe/trunk/include/clang/Basic/Module.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Module.h?rev=304346&r1=304345&r2=304346&view=diff
>
> ==
> --- cfe/trunk/include/clang/Basic/Module.h (original)
> +++ cfe/trunk/include/clang/Basic/Module.h Wed May 31 15:56:55 2017
> @@ -83,6 +83,10 @@ public:
>/// are found.
>const DirectoryEntry *Directory;
>
> +  /// \brief The presumed file name for the module map defining this
> module.
> +  /// Only non-empty when building from preprocessed source.
> +  std::string PresumedModuleMapFile;
> +
>/// \brief The umbrella header or directory.
>llvm::PointerUnion Umbrella;
>
>
> Modified: cfe/trunk/include/clang/Lex/HeaderSearch.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/HeaderSearch.h?rev=304346&r1=304345&r2=304346&view=diff
>
> ==
> --- cfe/trunk/include/clang/Lex/HeaderSearch.h (original)
> +++ cfe/trunk/include/clang/Lex/HeaderSearch.h Wed May 31 15:56:55 2017
> @@ -543,10 +543,13 @@ public:
>/// \param Offset [inout] An offset within ID to start parsing. On exit,
>///filled by the end of the parsed contents (either EOF or the
>///location of an end-of-module-map pragma).
> -  ///
> +  /// \param OriginalModuleMapFile The original path to the module map
> file,
> +  ///used to resolve paths within the module (this is required
> when
> +  ///building the module from preprocessed source).
>/// \returns true if an error occurred, false otherwise.
>bool loadModuleMapFile(const FileEntry *File, bool IsSystem,
> - FileID ID = FileID(), unsigned *Offset =
> nullptr);
> + FileID ID = FileID(), unsigned *Offset = nullptr,
> + StringRef OriginalModuleMapFile = StringRef());
>
>/// \brief Collect the set of all known, top-level modules.
>///
>
> Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendAction.cpp?rev=304346&r1=304345&r2=304346&view=diff
>
> ==
> --- cfe/trunk/lib/Frontend/FrontendAction.cpp (original)
> +++ cfe/trunk/lib/Frontend/FrontendAction.cpp Wed May 31 15:56:55 2017
> @@ -373,10 +373,11 @@ collectModuleHeaderIncludes(const LangOp
>return std::error_code();
>  }
>
> -static bool
> -loadModuleMapForModuleBuild(CompilerInstance &CI, StringRef Filename,
> -bool IsSystem, bool IsPreprocessed,
> -unsigned &Offset) {
> +static bool loadModuleMapForModuleBuild(CompilerInstance &CI,
> +StringRef Filename, bool IsSystem,
> +bool IsPreprocessed,
> +std::string
> &PresumedModuleMapFile,
> +unsigned &Offset) {
>auto &SrcMgr = CI.getSourceManager();
>HeaderSearch &HS = CI.getPreprocessor().getHeaderSearchInfo();
>
> @@ -388,16 +389,15 @@ loadModuleMapForModuleBuild(CompilerInst
> 

r304411 - Increase the limit for the number of DiagnosticLexKinds.td diags.

2017-06-01 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Thu Jun  1 07:46:59 2017
New Revision: 304411

URL: http://llvm.org/viewvc/llvm-project?rev=304411&view=rev
Log:
Increase the limit for the number of DiagnosticLexKinds.td diags.
300 was reached in r304190, 400 should be enough for a while.


Modified:
cfe/trunk/include/clang/Basic/DiagnosticIDs.h

Modified: cfe/trunk/include/clang/Basic/DiagnosticIDs.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticIDs.h?rev=304411&r1=304410&r2=304411&view=diff
==
--- cfe/trunk/include/clang/Basic/DiagnosticIDs.h (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticIDs.h Thu Jun  1 07:46:59 2017
@@ -32,7 +32,7 @@ namespace clang {
   DIAG_START_FRONTEND  = DIAG_START_DRIVER  +  200,
   DIAG_START_SERIALIZATION = DIAG_START_FRONTEND+  100,
   DIAG_START_LEX   = DIAG_START_SERIALIZATION   +  120,
-  DIAG_START_PARSE = DIAG_START_LEX +  300,
+  DIAG_START_PARSE = DIAG_START_LEX +  400,
   DIAG_START_AST   = DIAG_START_PARSE   +  500,
   DIAG_START_COMMENT   = DIAG_START_AST +  110,
   DIAG_START_SEMA  = DIAG_START_COMMENT +  100,


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


r305213 - Add regression test for r305179.

2017-06-12 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Mon Jun 12 13:05:13 2017
New Revision: 305213

URL: http://llvm.org/viewvc/llvm-project?rev=305213&view=rev
Log:
Add regression test for r305179.


Added:
cfe/trunk/test/Misc/pr32207.c

Added: cfe/trunk/test/Misc/pr32207.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/pr32207.c?rev=305213&view=auto
==
--- cfe/trunk/test/Misc/pr32207.c (added)
+++ cfe/trunk/test/Misc/pr32207.c Mon Jun 12 13:05:13 2017
@@ -0,0 +1,3 @@
+// test for r305179
+// RUN: %clang_cc1 -emit-llvm -O -mllvm -print-after-all %s -o %t 2>&1 | grep 
'*** IR Dump After Function Integration/Inlining ***'
+void foo() {}


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


r305215 - Address David Blaikie comment by replacing grep with FileCheck.

2017-06-12 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Mon Jun 12 13:29:37 2017
New Revision: 305215

URL: http://llvm.org/viewvc/llvm-project?rev=305215&view=rev
Log:
Address David Blaikie comment by replacing grep with FileCheck.


Modified:
cfe/trunk/test/Misc/pr32207.c

Modified: cfe/trunk/test/Misc/pr32207.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/pr32207.c?rev=305215&r1=305214&r2=305215&view=diff
==
--- cfe/trunk/test/Misc/pr32207.c (original)
+++ cfe/trunk/test/Misc/pr32207.c Mon Jun 12 13:29:37 2017
@@ -1,3 +1,4 @@
 // test for r305179
-// RUN: %clang_cc1 -emit-llvm -O -mllvm -print-after-all %s -o %t 2>&1 | grep 
'*** IR Dump After Function Integration/Inlining ***'
+// RUN: %clang_cc1 -emit-llvm -O -mllvm -print-after-all %s -o %t 2>&1 | 
FileCheck %s
+// CHECK: *** IR Dump After Function Integration/Inlining ***
 void foo() {}


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


Re: r305213 - Add regression test for r305179.

2017-06-12 Thread Yaron Keren via cfe-commits
Sure, r305215.

‫בתאריך יום ב׳, 12 ביוני 2017 ב-21:21 מאת ‪David Blaikie‬‏ <‪
dblai...@gmail.com‬‏>:‬

> Prefer FileCheck over grep, generally?
>
> On Mon, Jun 12, 2017 at 11:05 AM Yaron Keren via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
>> Author: yrnkrn
>> Date: Mon Jun 12 13:05:13 2017
>> New Revision: 305213
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=305213&view=rev
>> Log:
>> Add regression test for r305179.
>>
>>
>> Added:
>> cfe/trunk/test/Misc/pr32207.c
>>
>> Added: cfe/trunk/test/Misc/pr32207.c
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/pr32207.c?rev=305213&view=auto
>>
>> ==
>> --- cfe/trunk/test/Misc/pr32207.c (added)
>> +++ cfe/trunk/test/Misc/pr32207.c Mon Jun 12 13:05:13 2017
>> @@ -0,0 +1,3 @@
>> +// test for r305179
>> +// RUN: %clang_cc1 -emit-llvm -O -mllvm -print-after-all %s -o %t 2>&1 |
>> grep '*** IR Dump After Function Integration/Inlining ***'
>> +void foo() {}
>>
>>
>> ___
>> cfe-commits mailing list
>> cfe-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r305213 - Add regression test for r305179.

2017-06-12 Thread Yaron Keren via cfe-commits
Should also fix this bot failure

http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental_check/37468/testReport/junit/Clang/Misc/pr32207_c/


‫בתאריך יום ב׳, 12 ביוני 2017 ב-21:30 מאת ‪Yaron Keren‬‏ <‪
yaron.ke...@gmail.com‬‏>:‬

> Sure, r305215.
>
> ‫בתאריך יום ב׳, 12 ביוני 2017 ב-21:21 מאת ‪David Blaikie‬‏ <‪
> dblai...@gmail.com‬‏>:‬
>
>> Prefer FileCheck over grep, generally?
>>
>> On Mon, Jun 12, 2017 at 11:05 AM Yaron Keren via cfe-commits <
>> cfe-commits@lists.llvm.org> wrote:
>>
>>> Author: yrnkrn
>>> Date: Mon Jun 12 13:05:13 2017
>>> New Revision: 305213
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=305213&view=rev
>>> Log:
>>> Add regression test for r305179.
>>>
>>>
>>> Added:
>>> cfe/trunk/test/Misc/pr32207.c
>>>
>>> Added: cfe/trunk/test/Misc/pr32207.c
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/pr32207.c?rev=305213&view=auto
>>>
>>> ==
>>> --- cfe/trunk/test/Misc/pr32207.c (added)
>>> +++ cfe/trunk/test/Misc/pr32207.c Mon Jun 12 13:05:13 2017
>>> @@ -0,0 +1,3 @@
>>> +// test for r305179
>>> +// RUN: %clang_cc1 -emit-llvm -O -mllvm -print-after-all %s -o %t 2>&1
>>> | grep '*** IR Dump After Function Integration/Inlining ***'
>>> +void foo() {}
>>>
>>>
>>> ___
>>> cfe-commits mailing list
>>> cfe-commits@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>>
>>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r336047 - Add expected fail triple x86_64-pc-windows-gnu to test as x86_64-w64-mingw32 is already there

2018-06-30 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sat Jun 30 04:18:44 2018
New Revision: 336047

URL: http://llvm.org/viewvc/llvm-project?rev=336047&view=rev
Log:
Add expected fail triple x86_64-pc-windows-gnu to test as x86_64-w64-mingw32 is 
already there

Modified:
cfe/trunk/test/CodeGen/2007-06-18-SextAttrAggregate.c

Modified: cfe/trunk/test/CodeGen/2007-06-18-SextAttrAggregate.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2007-06-18-SextAttrAggregate.c?rev=336047&r1=336046&r2=336047&view=diff
==
--- cfe/trunk/test/CodeGen/2007-06-18-SextAttrAggregate.c (original)
+++ cfe/trunk/test/CodeGen/2007-06-18-SextAttrAggregate.c Sat Jun 30 04:18:44 
2018
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 %s -o - -emit-llvm | FileCheck %s
-// XFAIL: aarch64, arm64, x86_64-pc-win32, x86_64-w64-mingw32
+// XFAIL: aarch64, arm64, x86_64-pc-win32, x86_64-w64-mingw32, 
x86_64-pc-windows-gnu
 
 // PR1513
 


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


Re: [PATCH] D24754: [cleanup] Remove excessive padding from RedeclarableResult

2016-09-21 Thread Yaron Keren via cfe-commits
yaron.keren added a subscriber: yaron.keren.
yaron.keren added a comment.

also, gcc warns if order of field initializators is different than the order of 
fields.


Repository:
  rL LLVM

https://reviews.llvm.org/D24754



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


Re: r283063 - Alias must point to a definition

2016-10-02 Thread Yaron Keren via cfe-commits
The mangling is different when targeting MSVC ABI, see failure at

http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/29889/steps/test_all/logs/Clang%20%3A%3A%20CodeGenCXX__alias-available-externally.cpp

maybe   -triple x86_64-pc-linux  ?

2016-10-02 6:06 GMT+03:00 Aditya Kumar via cfe-commits <
cfe-commits@lists.llvm.org>:

> Author: hiraditya
> Date: Sat Oct  1 22:06:36 2016
> New Revision: 283063
>
> URL: http://llvm.org/viewvc/llvm-project?rev=283063&view=rev
> Log:
> Alias must point to a definition
>
> Reapplying the patch after modifying the test case.
>
> Inlining the destructor caused the compiler to generate bad IR which
> failed the Verifier in the backend.
> https://llvm.org/bugs/show_bug.cgi?id=30341
>
> This patch disables alias to available_externally definitions.
>
> Reviewers: eugenis, rsmith
>
> Differential Revision: https://reviews.llvm.org/D24682
>
> Added:
> cfe/trunk/test/CodeGenCXX/alias-available-externally.cpp
> Modified:
> cfe/trunk/lib/CodeGen/CGCXX.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/
> CGCXX.cpp?rev=283063&r1=283062&r2=283063&view=diff
> 
> ==
> --- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGCXX.cpp Sat Oct  1 22:06:36 2016
> @@ -134,6 +134,11 @@ bool CodeGenModule::TryEmitDefinitionAsA
>llvm::GlobalValue::LinkageTypes TargetLinkage =
>getFunctionLinkage(TargetDecl);
>
> +  // available_externally definitions aren't real definitions, so we
> cannot
> +  // create an alias to one.
> +  if (TargetLinkage == llvm::GlobalValue::AvailableExternallyLinkage)
> +return true;
> +
>// Check if we have it already.
>StringRef MangledName = getMangledName(AliasDecl);
>llvm::GlobalValue *Entry = GetGlobalValue(MangledName);
> @@ -156,14 +161,7 @@ bool CodeGenModule::TryEmitDefinitionAsA
>
>// Instead of creating as alias to a linkonce_odr, replace all of the
> uses
>// of the aliasee.
> -  if (llvm::GlobalValue::isDiscardableIfUnused(Linkage) &&
> - (TargetLinkage != llvm::GlobalValue::AvailableExternallyLinkage ||
> -  !TargetDecl.getDecl()->hasAttr())) {
> -// FIXME: An extern template instantiation will create functions with
> -// linkage "AvailableExternally". In libc++, some classes also define
> -// members with attribute "AlwaysInline" and expect no reference to
> -// be generated. It is desirable to reenable this optimisation after
> -// corresponding LLVM changes.
> +  if (llvm::GlobalValue::isDiscardableIfUnused(Linkage)) {
>  addReplacement(MangledName, Aliasee);
>  return false;
>}
>
> Added: cfe/trunk/test/CodeGenCXX/alias-available-externally.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/
> CodeGenCXX/alias-available-externally.cpp?rev=283063&view=auto
> 
> ==
> --- cfe/trunk/test/CodeGenCXX/alias-available-externally.cpp (added)
> +++ cfe/trunk/test/CodeGenCXX/alias-available-externally.cpp Sat Oct  1
> 22:06:36 2016
> @@ -0,0 +1,20 @@
> +// RUN: %clang_cc1 -O1 -std=c++11 -emit-llvm -disable-llvm-passes -o - %s
> | FileCheck %s
> +// Clang should not generate alias to available_externally definitions.
> +// Check that the destructor of Foo is defined.
> +// The destructors have different return type for different targets.
> +// CHECK: define linkonce_odr {{.*}} @_ZN3FooD2Ev
> +template 
> +struct String {
> +  String() {}
> +  ~String();
> +};
> +
> +template 
> +inline __attribute__((visibility("hidden"), always_inline))
> +String::~String() {}
> +
> +extern template struct String;
> +
> +struct Foo : public String { Foo() { String s; } };
> +
> +Foo f;
>
>
> ___
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r283063 - Alias must point to a definition

2016-10-03 Thread Yaron Keren via cfe-commits
yes, it works, thanks!

2016-10-03 18:19 GMT+03:00 Aditya K :

> Thanks for poining that out. I have updated the test case, please see if
> that works.
>
>
> http://llvm.org/viewvc/llvm-project?view=revision&revision=283085
>
>
>
> -Aditya
>
>
> ------
> *From:* Yaron Keren 
> *Sent:* Sunday, October 2, 2016 11:32 AM
> *To:* Aditya Kumar
> *Cc:* cfe-commits
> *Subject:* Re: r283063 - Alias must point to a definition
>
> The mangling is different when targeting MSVC ABI, see failure at
>
> http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/
> builds/29889/steps/test_all/logs/Clang%20%3A%3A%
> 20CodeGenCXX__alias-available-externally.cpp
>
> maybe   -triple x86_64-pc-linux  ?
>
> 2016-10-02 6:06 GMT+03:00 Aditya Kumar via cfe-commits <
> cfe-commits@lists.llvm.org>:
>
>> Author: hiraditya
>> Date: Sat Oct  1 22:06:36 2016
>> New Revision: 283063
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=283063&view=rev
>> Log:
>> Alias must point to a definition
>>
>> Reapplying the patch after modifying the test case.
>>
>> Inlining the destructor caused the compiler to generate bad IR which
>> failed the Verifier in the backend.
>> https://llvm.org/bugs/show_bug.cgi?id=30341
>>
>> This patch disables alias to available_externally definitions.
>>
>> Reviewers: eugenis, rsmith
>>
>> Differential Revision: https://reviews.llvm.org/D24682
>>
>> Added:
>> cfe/trunk/test/CodeGenCXX/alias-available-externally.cpp
>> Modified:
>> cfe/trunk/lib/CodeGen/CGCXX.cpp
>>
>> Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CG
>> CXX.cpp?rev=283063&r1=283062&r2=283063&view=diff
>> 
>> ==
>> --- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
>> +++ cfe/trunk/lib/CodeGen/CGCXX.cpp Sat Oct  1 22:06:36 2016
>> @@ -134,6 +134,11 @@ bool CodeGenModule::TryEmitDefinitionAsA
>>llvm::GlobalValue::LinkageTypes TargetLinkage =
>>getFunctionLinkage(TargetDecl);
>>
>> +  // available_externally definitions aren't real definitions, so we
>> cannot
>> +  // create an alias to one.
>> +  if (TargetLinkage == llvm::GlobalValue::AvailableExternallyLinkage)
>> +return true;
>> +
>>// Check if we have it already.
>>StringRef MangledName = getMangledName(AliasDecl);
>>llvm::GlobalValue *Entry = GetGlobalValue(MangledName);
>> @@ -156,14 +161,7 @@ bool CodeGenModule::TryEmitDefinitionAsA
>>
>>// Instead of creating as alias to a linkonce_odr, replace all of the
>> uses
>>// of the aliasee.
>> -  if (llvm::GlobalValue::isDiscardableIfUnused(Linkage) &&
>> - (TargetLinkage != llvm::GlobalValue::AvailableExternallyLinkage ||
>> -  !TargetDecl.getDecl()->hasAttr())) {
>> -// FIXME: An extern template instantiation will create functions with
>> -// linkage "AvailableExternally". In libc++, some classes also define
>> -// members with attribute "AlwaysInline" and expect no reference to
>> -// be generated. It is desirable to reenable this optimisation after
>> -// corresponding LLVM changes.
>> +  if (llvm::GlobalValue::isDiscardableIfUnused(Linkage)) {
>>  addReplacement(MangledName, Aliasee);
>>  return false;
>>}
>>
>> Added: cfe/trunk/test/CodeGenCXX/alias-available-externally.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCX
>> X/alias-available-externally.cpp?rev=283063&view=auto
>> 
>> ==
>> --- cfe/trunk/test/CodeGenCXX/alias-available-externally.cpp (added)
>> +++ cfe/trunk/test/CodeGenCXX/alias-available-externally.cpp Sat Oct  1
>> 22:06:36 2016
>> @@ -0,0 +1,20 @@
>> +// RUN: %clang_cc1 -O1 -std=c++11 -emit-llvm -disable-llvm-passes -o -
>> %s | FileCheck %s
>> +// Clang should not generate alias to available_externally definitions.
>> +// Check that the destructor of Foo is defined.
>> +// The destructors have different return type for different targets.
>> +// CHECK: define linkonce_odr {{.*}} @_ZN3FooD2Ev
>> +template 
>> +struct String {
>> +  String() {}
>> +  ~String();
>> +};
>> +
>> +template 
>> +inline __attribute__((visibility("hidden"), always_inline))
>> +String::~String() {}
>> +
>> +extern template struct String;
>> +
>> +struct Foo : public String { Foo() { String s; } };
>> +
>> +Foo f;
>>
>>
>> ___
>> cfe-commits mailing list
>> cfe-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r283657 - Un-tabify source files, NFC.

2016-10-07 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sat Oct  8 01:45:10 2016
New Revision: 283657

URL: http://llvm.org/viewvc/llvm-project?rev=283657&view=rev
Log:
Un-tabify source files, NFC.


Modified:
cfe/trunk/lib/AST/ASTContext.cpp
cfe/trunk/lib/AST/ExprConstant.cpp
cfe/trunk/lib/AST/NestedNameSpecifier.cpp
cfe/trunk/lib/AST/TypeLoc.cpp

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=283657&r1=283656&r2=283657&view=diff
==
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Sat Oct  8 01:45:10 2016
@@ -6557,9 +6557,8 @@ CreateX86_64ABIBuiltinVaListDecl(const A
 static TypedefDecl *CreatePNaClABIBuiltinVaListDecl(const ASTContext *Context) 
{
   // typedef int __builtin_va_list[4];
   llvm::APInt Size(Context->getTypeSize(Context->getSizeType()), 4);
-  QualType IntArrayType
-= Context->getConstantArrayType(Context->IntTy,
-   Size, ArrayType::Normal, 0);
+  QualType IntArrayType =
+  Context->getConstantArrayType(Context->IntTy, Size, ArrayType::Normal, 
0);
   return Context->buildImplicitTypedef(IntArrayType, "__builtin_va_list");
 }
 

Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=283657&r1=283656&r2=283657&view=diff
==
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Sat Oct  8 01:45:10 2016
@@ -5294,8 +5294,8 @@ bool PointerExprEvaluator::VisitCallExpr
 
   if (BaseAlignment < Align) {
 Result.Designator.setInvalid();
-   // FIXME: Quantities here cast to integers because the plural modifier
-   // does not work on APSInts yet.
+// FIXME: Quantities here cast to integers because the plural modifier
+// does not work on APSInts yet.
 CCEDiag(E->getArg(0),
 diag::note_constexpr_baa_insufficient_alignment) << 0
   << (int) BaseAlignment.getQuantity()

Modified: cfe/trunk/lib/AST/NestedNameSpecifier.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/NestedNameSpecifier.cpp?rev=283657&r1=283656&r2=283657&view=diff
==
--- cfe/trunk/lib/AST/NestedNameSpecifier.cpp (original)
+++ cfe/trunk/lib/AST/NestedNameSpecifier.cpp Sat Oct  8 01:45:10 2016
@@ -155,7 +155,7 @@ NestedNameSpecifier::SpecifierKind Neste
 
 /// \brief Retrieve the namespace stored in this nested name specifier.
 NamespaceDecl *NestedNameSpecifier::getAsNamespace() const {
-   if (Prefix.getInt() == StoredDecl)
+  if (Prefix.getInt() == StoredDecl)
 return dyn_cast(static_cast(Specifier));
 
   return nullptr;
@@ -163,7 +163,7 @@ NamespaceDecl *NestedNameSpecifier::getA
 
 /// \brief Retrieve the namespace alias stored in this nested name specifier.
 NamespaceAliasDecl *NestedNameSpecifier::getAsNamespaceAlias() const {
-   if (Prefix.getInt() == StoredDecl)
+  if (Prefix.getInt() == StoredDecl)
 return dyn_cast(static_cast(Specifier));
 
   return nullptr;

Modified: cfe/trunk/lib/AST/TypeLoc.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TypeLoc.cpp?rev=283657&r1=283656&r2=283657&view=diff
==
--- cfe/trunk/lib/AST/TypeLoc.cpp (original)
+++ cfe/trunk/lib/AST/TypeLoc.cpp Sat Oct  8 01:45:10 2016
@@ -210,7 +210,7 @@ SourceLocation TypeLoc::getEndLoc() cons
 switch (Cur.getTypeLocClass()) {
 default:
   if (!Last)
-   Last = Cur;
+Last = Cur;
   return Last.getLocalSourceRange().getEnd();
 case Paren:
 case ConstantArray:


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


[clang] 5aa0f9c - Use installed llvm-lit.py instead of lit.py PR-51072

2021-08-17 Thread Yaron Keren via cfe-commits

Author: Yaron Keren
Date: 2021-08-18T09:06:06+03:00
New Revision: 5aa0f9cc9ab267803ad7bcfd14c8fd8bbffd82cb

URL: 
https://github.com/llvm/llvm-project/commit/5aa0f9cc9ab267803ad7bcfd14c8fd8bbffd82cb
DIFF: 
https://github.com/llvm/llvm-project/commit/5aa0f9cc9ab267803ad7bcfd14c8fd8bbffd82cb.diff

LOG: Use installed llvm-lit.py instead of lit.py PR-51072

Three tests fail when building and testing LLVM from the Visual C++ environment
since they use the repo version of lit.py that do not have local customization
builtin_parameters = { 'build_mode' : 'Release' }
https://bugs.llvm.org/show_bug.cgi?id=51072

Reviewed By: dyung

Differential Revision: https://reviews.llvm.org/D108085

Added: 


Modified: 
clang/test/utils/update_cc_test_checks/lit.local.cfg

Removed: 




diff  --git a/clang/test/utils/update_cc_test_checks/lit.local.cfg 
b/clang/test/utils/update_cc_test_checks/lit.local.cfg
index 14d1ba260bb4a..6b4f5cfc62ed3 100644
--- a/clang/test/utils/update_cc_test_checks/lit.local.cfg
+++ b/clang/test/utils/update_cc_test_checks/lit.local.cfg
@@ -1,4 +1,5 @@
 import os
+import glob
 
 import lit.util
 
@@ -19,7 +20,9 @@ extra_args += ' --opt ' + shell_quote(opt_path)
 script_path = os.path.join(config.llvm_src_root, 'utils',
'update_cc_test_checks.py')
 assert os.path.isfile(script_path)
-lit = config.llvm_external_lit if config.llvm_external_lit else 
shell_quote(os.path.join(config.llvm_src_root, 'utils', 'lit', 'lit.py'))
+# Windows: llvm-lit.py, Linux: llvm-lit
+llvm_lit = glob.glob(os.path.join(config.llvm_tools_dir, 'llvm-lit*'))[0]
+lit = config.llvm_external_lit if config.llvm_external_lit else 
shell_quote(llvm_lit)
 python = shell_quote(config.python_executable)
 config.substitutions.append(
 ('%update_cc_test_checks', "%s %s %s" % (



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


r328447 - Remove reference to stale (2009) python version.

2018-03-25 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sun Mar 25 06:12:05 2018
New Revision: 328447

URL: http://llvm.org/viewvc/llvm-project?rev=328447&view=rev
Log:
Remove reference to stale (2009) python version.


Modified:
cfe/trunk/www/hacking.html

Modified: cfe/trunk/www/hacking.html
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/www/hacking.html?rev=328447&r1=328446&r2=328447&view=diff
==
--- cfe/trunk/www/hacking.html (original)
+++ cfe/trunk/www/hacking.html Sun Mar 25 06:12:05 2018
@@ -180,7 +180,7 @@
   Note that the test runner is based on
   Python, which must be installed.  Find Python at:
   http://www.python.org/download/";>http://www.python.org/download/.
-  Download the latest stable version (2.6.2 at the time of this writing).
+  Download the latest stable version.
 
   The GnuWin32 tools are also necessary for running the tests.
   Get them from http://getgnuwin32.sourceforge.net/";>


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


r290495 - Deduplicate several GD.getDecl() calls into Decl * local variable.

2016-12-24 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sat Dec 24 09:32:39 2016
New Revision: 290495

URL: http://llvm.org/viewvc/llvm-project?rev=290495&view=rev
Log:
Deduplicate several GD.getDecl() calls into Decl * local variable.


Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=290495&r1=290494&r2=290495&view=diff
==
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Sat Dec 24 09:32:39 2016
@@ -2300,29 +2300,30 @@ CodeGenModule::GetOrCreateLLVMGlobal(Str
 llvm::Constant *
 CodeGenModule::GetAddrOfGlobal(GlobalDecl GD,
ForDefinition_t IsForDefinition) {
-  if (isa(GD.getDecl()))
-return getAddrOfCXXStructor(cast(GD.getDecl()),
+  const Decl *D = GD.getDecl();
+  if (isa(D))
+return getAddrOfCXXStructor(cast(D),
 getFromCtorType(GD.getCtorType()),
 /*FnInfo=*/nullptr, /*FnType=*/nullptr,
 /*DontDefer=*/false, IsForDefinition);
-  else if (isa(GD.getDecl()))
-return getAddrOfCXXStructor(cast(GD.getDecl()),
+  else if (isa(D))
+return getAddrOfCXXStructor(cast(D),
 getFromDtorType(GD.getDtorType()),
 /*FnInfo=*/nullptr, /*FnType=*/nullptr,
 /*DontDefer=*/false, IsForDefinition);
-  else if (isa(GD.getDecl())) {
+  else if (isa(D)) {
 auto FInfo = &getTypes().arrangeCXXMethodDeclaration(
-cast(GD.getDecl()));
+cast(D));
 auto Ty = getTypes().GetFunctionType(*FInfo);
 return GetAddrOfFunction(GD, Ty, /*ForVTable=*/false, /*DontDefer=*/false,
  IsForDefinition);
-  } else if (isa(GD.getDecl())) {
+  } else if (isa(D)) {
 const CGFunctionInfo &FI = getTypes().arrangeGlobalDeclaration(GD);
 llvm::FunctionType *Ty = getTypes().GetFunctionType(FI);
 return GetAddrOfFunction(GD, Ty, /*ForVTable=*/false, /*DontDefer=*/false,
  IsForDefinition);
   } else
-return GetAddrOfGlobalVar(cast(GD.getDecl()), /*Ty=*/nullptr,
+return GetAddrOfGlobalVar(cast(D), /*Ty=*/nullptr,
   IsForDefinition);
 }
 


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


r291230 - Constify UsingPackDecl::getInstantiatedFromUsingDecl(), NFC.

2017-01-06 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Fri Jan  6 05:15:57 2017
New Revision: 291230

URL: http://llvm.org/viewvc/llvm-project?rev=291230&view=rev
Log:
Constify UsingPackDecl::getInstantiatedFromUsingDecl(), NFC.


Modified:
cfe/trunk/include/clang/AST/DeclCXX.h

Modified: cfe/trunk/include/clang/AST/DeclCXX.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=291230&r1=291229&r2=291230&view=diff
==
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Fri Jan  6 05:15:57 2017
@@ -3181,7 +3181,7 @@ public:
   /// Get the using declaration from which this was instantiated. This will
   /// always be an UnresolvedUsingValueDecl or an UnresolvedUsingTypenameDecl
   /// that is a pack expansion.
-  NamedDecl *getInstantiatedFromUsingDecl() { return InstantiatedFrom; }
+  NamedDecl *getInstantiatedFromUsingDecl() const { return InstantiatedFrom; }
 
   /// Get the set of using declarations that this pack expanded into. Note that
   /// some of these may still be unresolved.


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


Re: r278984 - Add test missed from r278983.

2016-08-24 Thread Yaron Keren via cfe-commits
I see the same stack overflow asan error in a local buildbot.


2016-08-22 20:30 GMT+03:00 Akira Hatanaka via cfe-commits <
cfe-commits@lists.llvm.org>:

> Hi Richard,
>
> This test has been failing since it was committed.
>
> http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/2277/
>
> > On Aug 17, 2016, at 2:42 PM, Richard Smith via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
> >
> > Author: rsmith
> > Date: Wed Aug 17 16:42:10 2016
> > New Revision: 278984
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=278984&view=rev
> > Log:
> > Add test missed from r278983.
> >
> > Added:
> >cfe/trunk/test/SemaTemplate/instantiation-depth-default.cpp
> >
> > Added: cfe/trunk/test/SemaTemplate/instantiation-depth-default.cpp
> > URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/
> SemaTemplate/instantiation-depth-default.cpp?rev=278984&view=auto
> > 
> ==
> > --- cfe/trunk/test/SemaTemplate/instantiation-depth-default.cpp (added)
> > +++ cfe/trunk/test/SemaTemplate/instantiation-depth-default.cpp Wed Aug
> 17 16:42:10 2016
> > @@ -0,0 +1,9 @@
> > +// RUN: %clang_cc1 -fsyntax-only -verify -ftemplate-backtrace-limit 2 %s
> > +
> > +template struct X : X {};
> > +// expected-error-re@3 {{recursive template instantiation exceeded
> maximum depth of 1024{{$
> > +// expected-note@3 {{instantiation of template class}}
> > +// expected-note@3 {{skipping 1023 contexts in backtrace}}
> > +// expected-note@3 {{use -ftemplate-depth=N to increase recursive
> template instantiation depth}}
> > +
> > +X<0, int> x; // expected-note {{in instantiation of}}
> >
> >
> > ___
> > cfe-commits mailing list
> > cfe-commits@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
> ___
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r278984 - Add test missed from r278983.

2016-08-24 Thread Yaron Keren via cfe-commits
Thanks!

2016-08-25 0:39 GMT+03:00 Richard Smith :

> As of r279668, we shouldn't run this test for ASan builds any more.
> Perhaps we should increase Clang's minimum stack allocation when built with
> ASan to compensate for it making stack frames larger.
>

On Wed, Aug 24, 2016 at 12:33 AM, Yaron Keren  wrote:

> I see the same stack overflow asan error in a local buildbot.
>
>
> 2016-08-22 20:30 GMT+03:00 Akira Hatanaka via cfe-commits <
> cfe-commits@lists.llvm.org>:
>
>> Hi Richard,
>>
>> This test has been failing since it was committed.
>>
>> http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/2277/
>>
>> > On Aug 17, 2016, at 2:42 PM, Richard Smith via cfe-commits <
>> cfe-commits@lists.llvm.org> wrote:
>> >
>> > Author: rsmith
>> > Date: Wed Aug 17 16:42:10 2016
>> > New Revision: 278984
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=278984&view=rev
>> > Log:
>> > Add test missed from r278983.
>> >
>> > Added:
>> >cfe/trunk/test/SemaTemplate/instantiation-depth-default.cpp
>> >
>> > Added: cfe/trunk/test/SemaTemplate/instantiation-depth-default.cpp
>> > URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTempl
>> ate/instantiation-depth-default.cpp?rev=278984&view=auto
>> > 
>> ==
>> > --- cfe/trunk/test/SemaTemplate/instantiation-depth-default.cpp (added)
>> > +++ cfe/trunk/test/SemaTemplate/instantiation-depth-default.cpp Wed
>> Aug 17 16:42:10 2016
>> > @@ -0,0 +1,9 @@
>> > +// RUN: %clang_cc1 -fsyntax-only -verify -ftemplate-backtrace-limit 2
>> %s
>> > +
>> > +template struct X : X {};
>> > +// expected-error-re@3 {{recursive template instantiation exceeded
>> maximum depth of 1024{{$
>> > +// expected-note@3 {{instantiation of template class}}
>> > +// expected-note@3 {{skipping 1023 contexts in backtrace}}
>> > +// expected-note@3 {{use -ftemplate-depth=N to increase recursive
>> template instantiation depth}}
>> > +
>> > +X<0, int> x; // expected-note {{in instantiation of}}
>> >
>> >
>> > ___
>> > cfe-commits mailing list
>> > cfe-commits@lists.llvm.org
>> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>> ___
>> cfe-commits mailing list
>> cfe-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r299079 - Move NumRegParameters Module Flag. NFCI.

2017-03-30 Thread Yaron Keren via cfe-commits
Thanks!
If you like, might make sense now to move all these addModuleFlag() into a
new helper function, addModuleFlags().


‫בתאריך יום ה׳, 30 במרץ 2017 ב-16:54 מאת ‪Nirav Dave via cfe-commits‬‏ <‪
cfe-commits@lists.llvm.org‬‏>:‬

> Author: niravd
> Date: Thu Mar 30 08:41:44 2017
> New Revision: 299079
>
> URL: http://llvm.org/viewvc/llvm-project?rev=299079&view=rev
> Log:
> Move NumRegParameters Module Flag. NFCI.
>
> Modified:
> cfe/trunk/lib/CodeGen/CodeGenModule.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=299079&r1=299078&r2=299079&view=diff
>
> ==
> --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Thu Mar 30 08:41:44 2017
> @@ -159,12 +159,6 @@ CodeGenModule::CodeGenModule(ASTContext
>// CoverageMappingModuleGen object.
>if (CodeGenOpts.CoverageMapping)
>  CoverageMapping.reset(new CoverageMappingModuleGen(*this,
> *CoverageInfo));
> -
> -  // Record mregparm value now so it is visible through rest of codegen.
> -  if (Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86)
> -getModule().addModuleFlag(llvm::Module::Error,
> "NumRegisterParameters",
> -  CodeGenOpts.NumRegisterParameters);
> -
>  }
>
>  CodeGenModule::~CodeGenModule() {}
> @@ -424,6 +418,11 @@ void CodeGenModule::Release() {
>  EmitModuleLinkOptions();
>}
>
> +  // Record mregparm value now so it is visible through rest of codegen.
> +  if (Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86)
> +getModule().addModuleFlag(llvm::Module::Error,
> "NumRegisterParameters",
> +  CodeGenOpts.NumRegisterParameters);
> +
>if (CodeGenOpts.DwarfVersion) {
>  // We actually want the latest version when there are conflicts.
>  // We can change from Warning to Latest if such mode is supported.
>
>
> ___
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r300036 - Remove Sema::addOverloadedOperatorToUnresolvedSet declaration. Its definition was removed in r206436.

2017-04-12 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Wed Apr 12 03:17:44 2017
New Revision: 300036

URL: http://llvm.org/viewvc/llvm-project?rev=300036&view=rev
Log:
Remove Sema::addOverloadedOperatorToUnresolvedSet declaration. Its definition 
was removed in r206436.


Modified:
cfe/trunk/include/clang/Sema/Sema.h

Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=300036&r1=300035&r2=300036&view=diff
==
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Wed Apr 12 03:17:44 2017
@@ -2996,9 +2996,6 @@ public:
   void LookupOverloadedOperatorName(OverloadedOperatorKind Op, Scope *S,
 QualType T1, QualType T2,
 UnresolvedSetImpl &Functions);
-  void addOverloadedOperatorToUnresolvedSet(UnresolvedSetImpl &Functions,
-DeclAccessPair Operator,
-QualType T1, QualType T2);
 
   LabelDecl *LookupOrCreateLabel(IdentifierInfo *II, SourceLocation IdentLoc,
  SourceLocation GnuLabelLoc = 
SourceLocation());


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


r300043 - Rangify for loop, NFC.

2017-04-12 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Wed Apr 12 05:05:48 2017
New Revision: 300043

URL: http://llvm.org/viewvc/llvm-project?rev=300043&view=rev
Log:
Rangify for loop, NFC.

Modified:
cfe/trunk/lib/Sema/SemaLookup.cpp

Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=300043&r1=300042&r2=300043&view=diff
==
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Wed Apr 12 05:05:48 2017
@@ -838,9 +838,7 @@ static bool LookupDirect(Sema &S, Lookup
 
   // Perform lookup into this declaration context.
   DeclContext::lookup_result DR = DC->lookup(R.getLookupName());
-  for (DeclContext::lookup_iterator I = DR.begin(), E = DR.end(); I != E;
-   ++I) {
-NamedDecl *D = *I;
+  for (NamedDecl *D : DR) {
 if ((D = R.getAcceptableDecl(D))) {
   R.addDecl(D);
   Found = true;


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


r300423 - Use setUsedForHeaderGuard() accessor function instead of direcly accessing UsedForHeaderGuard.

2017-04-16 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sun Apr 16 10:53:19 2017
New Revision: 300423

URL: http://llvm.org/viewvc/llvm-project?rev=300423&view=rev
Log:
Use setUsedForHeaderGuard() accessor function instead of direcly accessing 
UsedForHeaderGuard.

Modified:
cfe/trunk/lib/Lex/PPLexerChange.cpp

Modified: cfe/trunk/lib/Lex/PPLexerChange.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPLexerChange.cpp?rev=300423&r1=300422&r2=300423&view=diff
==
--- cfe/trunk/lib/Lex/PPLexerChange.cpp (original)
+++ cfe/trunk/lib/Lex/PPLexerChange.cpp Sun Apr 16 10:53:19 2017
@@ -303,9 +303,8 @@ bool Preprocessor::HandleEndOfFile(Token
   if (const FileEntry *FE = CurPPLexer->getFileEntry()) {
 HeaderInfo.SetFileControllingMacro(FE, ControllingMacro);
 if (MacroInfo *MI =
-  getMacroInfo(const_cast(ControllingMacro))) {
-  MI->UsedForHeaderGuard = true;
-}
+  getMacroInfo(const_cast(ControllingMacro)))
+  MI->setUsedForHeaderGuard(true);
 if (const IdentifierInfo *DefinedMacro =
   CurPPLexer->MIOpt.GetDefinedMacro()) {
   if (!isMacroDefined(ControllingMacro) &&


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


r300443 - Address http://bugs.llvm.org/pr30994 so that a non-friend can properly replace a friend, and a visible friend can properly replace an invisible friend but not vice verse, and definitions are

2017-04-17 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Mon Apr 17 03:51:20 2017
New Revision: 300443

URL: http://llvm.org/viewvc/llvm-project?rev=300443&view=rev
Log:
Address http://bugs.llvm.org/pr30994 so that a non-friend can properly replace 
a friend, and a visible friend can properly replace an invisible friend but not 
vice verse, and definitions are not replaced. This fixes the two FIXME in 
SemaTemplate/friend-template.cpp.

The code implements Richard Smith suggestion in comment 3 of the PR.

reviewer: Vassil Vassilev

Differential Revision: https://reviews.llvm.org/D31540


Modified:
cfe/trunk/include/clang/AST/DeclBase.h
cfe/trunk/lib/AST/Decl.cpp
cfe/trunk/lib/AST/DeclBase.cpp
cfe/trunk/test/SemaTemplate/friend-template.cpp

Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=300443&r1=300442&r2=300443&view=diff
==
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Mon Apr 17 03:51:20 2017
@@ -417,6 +417,8 @@ public:
 return const_cast(this)->getTranslationUnitDecl();
   }
 
+  bool isThisDeclarationADefinition() const;
+
   bool isInAnonymousNamespace() const;
 
   bool isInStdNamespace() const;

Modified: cfe/trunk/lib/AST/Decl.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=300443&r1=300442&r2=300443&view=diff
==
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Mon Apr 17 03:51:20 2017
@@ -1536,6 +1536,10 @@ bool NamedDecl::declarationReplaces(Name
   if (isa(this))
 return false;
 
+  if (getFriendObjectKind() > OldD->getFriendObjectKind() &&
+  !isThisDeclarationADefinition())
+return false;
+
   // For parameters, pick the newer one. This is either an error or (in
   // Objective-C) permitted as an extension.
   if (isa(this))

Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=300443&r1=300442&r2=300443&view=diff
==
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Mon Apr 17 03:51:20 2017
@@ -861,6 +861,21 @@ const FunctionType *Decl::getFunctionTyp
   return Ty->getAs();
 }
 
+bool Decl::isThisDeclarationADefinition() const {
+  if (auto *TD = dyn_cast(this))
+return TD->isThisDeclarationADefinition();
+  if (auto *FD = dyn_cast(this))
+return FD->isThisDeclarationADefinition();
+  if (auto *VD = dyn_cast(this))
+return VD->isThisDeclarationADefinition();
+  if (auto *CTD = dyn_cast(this))
+return CTD->isThisDeclarationADefinition();
+  if (auto *FTD = dyn_cast(this))
+return FTD->isThisDeclarationADefinition();
+  if (auto *VTD = dyn_cast(this))
+return VTD->isThisDeclarationADefinition();
+  return false;
+}
 
 /// Starting at a given context (a Decl or DeclContext), look for a
 /// code context that is not a closure (a lambda, block, etc.).

Modified: cfe/trunk/test/SemaTemplate/friend-template.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/friend-template.cpp?rev=300443&r1=300442&r2=300443&view=diff
==
--- cfe/trunk/test/SemaTemplate/friend-template.cpp (original)
+++ cfe/trunk/test/SemaTemplate/friend-template.cpp Mon Apr 17 03:51:20 2017
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
 // PR5057
 namespace test0 {
   namespace std {
@@ -68,17 +68,12 @@ namespace test3 {
   Foo foo;
 
   template struct X2a;
-
-  template struct X2b;
+  template struct X2b;// expected-note {{previous 
non-type template parameter with type 'int' is here}}
 
   template
   class X3 {
 template friend struct X2a;
-
-// FIXME: the redeclaration note ends up here because redeclaration
-// lookup ends up finding the friend target from X3.
-template friend struct X2b; // expected-error 
{{template non-type parameter has a different type 'long' in template 
redeclaration}} \
-  // expected-note {{previous non-type template parameter with type 'int' 
is here}}
+template friend struct X2b; // expected-error 
{{template non-type parameter has a different type 'long' in template 
redeclaration}} 
   };
 
   X3 x3i; // okay
@@ -297,14 +292,11 @@ namespace PR12585 {
   int n = C::D().f();
 
   struct F {
-template struct G;
+template struct G; // expected-note {{previous}}
   };
   template struct H {
-// FIXME: As with cases above, the note here is on an unhelpful 
declaration,
-// and should point to the declaration of G within F.
 template friend struct F::G; // \
-  // expected-error {{different type 'char' in template redeclaration}} \
-  // expected-note {{prev

Re: r300443 - Address http://bugs.llvm.org/pr30994 so that a non-friend can properly replace a friend, and a visible friend can properly replace an invisible friend but not vice verse, and definitions

2017-04-17 Thread Yaron Keren via cfe-commits
Thanks, I will look into this.


‫בתאריך יום ג׳, 18 באפר׳ 2017 ב-0:11 מאת ‪Benjamin Kramer‬‏ <‪
benny@gmail.com‬‏>:‬

> This broke our internal build of libc++ with modules. Reduced test
> case attached, courtesy of Richard Smith!
>
> With your patch it doesn't compiler anymore:
> While building module 'x':
> In file included from :2:
> In file included from ./c.h:1:
> ./a.h:3:32: error: inline declaration of 'f' follows non-inline definition
> template inline void f() {}
>^
> ./a.h:3:32: note: previous definition is here
> template inline void f() {}
>
>
> I reverted this change in r300497.
>
> On Mon, Apr 17, 2017 at 10:51 AM, Yaron Keren via cfe-commits
>  wrote:
> > Author: yrnkrn
> > Date: Mon Apr 17 03:51:20 2017
> > New Revision: 300443
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=300443&view=rev
> > Log:
> > Address http://bugs.llvm.org/pr30994 so that a non-friend can properly
> replace a friend, and a visible friend can properly replace an invisible
> friend but not vice verse, and definitions are not replaced. This fixes the
> two FIXME in SemaTemplate/friend-template.cpp.
> >
> > The code implements Richard Smith suggestion in comment 3 of the PR.
> >
> > reviewer: Vassil Vassilev
> >
> > Differential Revision: https://reviews.llvm.org/D31540
> >
> >
> > Modified:
> > cfe/trunk/include/clang/AST/DeclBase.h
> > cfe/trunk/lib/AST/Decl.cpp
> > cfe/trunk/lib/AST/DeclBase.cpp
> > cfe/trunk/test/SemaTemplate/friend-template.cpp
> >
> > Modified: cfe/trunk/include/clang/AST/DeclBase.h
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=300443&r1=300442&r2=300443&view=diff
> >
> ==
> > --- cfe/trunk/include/clang/AST/DeclBase.h (original)
> > +++ cfe/trunk/include/clang/AST/DeclBase.h Mon Apr 17 03:51:20 2017
> > @@ -417,6 +417,8 @@ public:
> >  return const_cast(this)->getTranslationUnitDecl();
> >}
> >
> > +  bool isThisDeclarationADefinition() const;
> > +
> >bool isInAnonymousNamespace() const;
> >
> >bool isInStdNamespace() const;
> >
> > Modified: cfe/trunk/lib/AST/Decl.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=300443&r1=300442&r2=300443&view=diff
> >
> ==
> > --- cfe/trunk/lib/AST/Decl.cpp (original)
> > +++ cfe/trunk/lib/AST/Decl.cpp Mon Apr 17 03:51:20 2017
> > @@ -1536,6 +1536,10 @@ bool NamedDecl::declarationReplaces(Name
> >if (isa(this))
> >  return false;
> >
> > +  if (getFriendObjectKind() > OldD->getFriendObjectKind() &&
> > +  !isThisDeclarationADefinition())
> > +return false;
> > +
> >// For parameters, pick the newer one. This is either an error or (in
> >// Objective-C) permitted as an extension.
> >if (isa(this))
> >
> > Modified: cfe/trunk/lib/AST/DeclBase.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=300443&r1=300442&r2=300443&view=diff
> >
> ==
> > --- cfe/trunk/lib/AST/DeclBase.cpp (original)
> > +++ cfe/trunk/lib/AST/DeclBase.cpp Mon Apr 17 03:51:20 2017
> > @@ -861,6 +861,21 @@ const FunctionType *Decl::getFunctionTyp
> >return Ty->getAs();
> >  }
> >
> > +bool Decl::isThisDeclarationADefinition() const {
> > +  if (auto *TD = dyn_cast(this))
> > +return TD->isThisDeclarationADefinition();
> > +  if (auto *FD = dyn_cast(this))
> > +return FD->isThisDeclarationADefinition();
> > +  if (auto *VD = dyn_cast(this))
> > +return VD->isThisDeclarationADefinition();
> > +  if (auto *CTD = dyn_cast(this))
> > +return CTD->isThisDeclarationADefinition();
> > +  if (auto *FTD = dyn_cast(this))
> > +return FTD->isThisDeclarationADefinition();
> > +  if (auto *VTD = dyn_cast(this))
> > +return VTD->isThisDeclarationADefinition();
> > +  return false;
> > +}
> >
> >  /// Starting at a given context (a Decl or DeclContext), look for a
> >  /// code context that is not a closure (a lambda, block, etc.).
> >
> > Modified: cfe/trunk/test/SemaTemplate/friend-template.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTempla

r292032 - Fix PR31644 introduced by r287138 and add a regression test.

2017-01-14 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sat Jan 14 15:12:08 2017
New Revision: 292032

URL: http://llvm.org/viewvc/llvm-project?rev=292032&view=rev
Log:
Fix PR31644 introduced by r287138 and add a regression test.
Thanks Dimitry Andric for the report and fix!


Modified:
cfe/trunk/lib/Frontend/DependencyFile.cpp
cfe/trunk/test/Preprocessor/dependencies-and-pp.c

Modified: cfe/trunk/lib/Frontend/DependencyFile.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/DependencyFile.cpp?rev=292032&r1=292031&r2=292032&view=diff
==
--- cfe/trunk/lib/Frontend/DependencyFile.cpp (original)
+++ cfe/trunk/lib/Frontend/DependencyFile.cpp Sat Jan 14 15:12:08 2017
@@ -447,9 +447,9 @@ void DFGImpl::OutputDependencyFile() {
   // Create phony targets if requested.
   if (PhonyTarget && !Files.empty()) {
 // Skip the first entry, this is always the input file itself.
-for (StringRef File : Files) {
+for (auto I = Files.begin() + 1, E = Files.end(); I != E; ++I) {
   OS << '\n';
-  PrintFilename(OS, File, OutputFormat);
+  PrintFilename(OS, *I, OutputFormat);
   OS << ":\n";
 }
   }

Modified: cfe/trunk/test/Preprocessor/dependencies-and-pp.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/dependencies-and-pp.c?rev=292032&r1=292031&r2=292032&view=diff
==
--- cfe/trunk/test/Preprocessor/dependencies-and-pp.c (original)
+++ cfe/trunk/test/Preprocessor/dependencies-and-pp.c Sat Jan 14 15:12:08 2017
@@ -32,5 +32,12 @@
 // RUN: FileCheck -check-prefix=TEST5 %s < %t.d
 // TEST5: foo $$(bar) b az qu\ ux \ space:
 
+// Test self dependency, PR31644
+
+// RUN: %clang -E -MD -MP -MF %t.d %s
+// RUN: FileCheck -check-prefix=TEST6 %s < %t.d
+// TEST6: dependencies-and-pp.c
+// TEST6-NOT: dependencies-and-pp.c:
+
 // TODO: Test default target without quoting
 // TODO: Test default target with quoting


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


r295839 - Remove superfluous initializer.

2017-02-22 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Wed Feb 22 08:32:39 2017
New Revision: 295839

URL: http://llvm.org/viewvc/llvm-project?rev=295839&view=rev
Log:
Remove superfluous initializer. 
The following fully-covered switch either sets value to External or exits the 
function.


Modified:
cfe/trunk/lib/AST/ASTContext.cpp

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=295839&r1=295838&r2=295839&view=diff
==
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Wed Feb 22 08:32:39 2017
@@ -8810,7 +8810,7 @@ static GVALinkage basicGVALinkageForFunc
   if (!FD->isExternallyVisible())
 return GVA_Internal;
 
-  GVALinkage External = GVA_StrongExternal;
+  GVALinkage External;
   switch (FD->getTemplateSpecializationKind()) {
   case TSK_Undeclared:
   case TSK_ExplicitSpecialization:


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


r287102 - Rangify for loop, NFC.

2016-11-16 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Wed Nov 16 07:45:34 2016
New Revision: 287102

URL: http://llvm.org/viewvc/llvm-project?rev=287102&view=rev
Log:
Rangify for loop, NFC.


Modified:
cfe/trunk/lib/Sema/SemaTemplate.cpp

Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=287102&r1=287101&r2=287102&view=diff
==
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Wed Nov 16 07:45:34 2016
@@ -2990,12 +2990,10 @@ Sema::CheckVarTemplateId(VarTemplateDecl
 << Decl;
 
 // Print the matching partial specializations.
-for (SmallVector::iterator P = Matched.begin(),
-   PEnd = Matched.end();
- P != PEnd; ++P)
-  Diag(P->Partial->getLocation(), diag::note_partial_spec_match)
-  << getTemplateArgumentBindingsText(
- P->Partial->getTemplateParameters(), *P->Args);
+for (MatchResult P : Matched)
+  Diag(P.Partial->getLocation(), diag::note_partial_spec_match)
+  << 
getTemplateArgumentBindingsText(P.Partial->getTemplateParameters(),
+ *P.Args);
 return true;
   }
 


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


r287138 - Rangify for loops, NFC.

2016-11-16 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Wed Nov 16 13:24:10 2016
New Revision: 287138

URL: http://llvm.org/viewvc/llvm-project?rev=287138&view=rev
Log:
Rangify for loops, NFC.


Modified:
cfe/trunk/lib/Frontend/DependencyFile.cpp

Modified: cfe/trunk/lib/Frontend/DependencyFile.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/DependencyFile.cpp?rev=287138&r1=287137&r2=287138&view=diff
==
--- cfe/trunk/lib/Frontend/DependencyFile.cpp (original)
+++ cfe/trunk/lib/Frontend/DependencyFile.cpp Wed Nov 16 13:24:10 2016
@@ -409,9 +409,8 @@ void DFGImpl::OutputDependencyFile() {
   const unsigned MaxColumns = 75;
   unsigned Columns = 0;
 
-  for (std::vector::iterator
- I = Targets.begin(), E = Targets.end(); I != E; ++I) {
-unsigned N = I->length();
+  for (StringRef Target : Targets) {
+unsigned N = Target.size();
 if (Columns == 0) {
   Columns += N;
 } else if (Columns + N + 2 > MaxColumns) {
@@ -422,7 +421,7 @@ void DFGImpl::OutputDependencyFile() {
   OS << ' ';
 }
 // Targets already quoted as needed.
-OS << *I;
+OS << Target;
   }
 
   OS << ':';
@@ -430,18 +429,17 @@ void DFGImpl::OutputDependencyFile() {
 
   // Now add each dependency in the order it was seen, but avoiding
   // duplicates.
-  for (std::vector::iterator I = Files.begin(),
- E = Files.end(); I != E; ++I) {
+  for (StringRef File : Files) {
 // Start a new line if this would exceed the column limit. Make
 // sure to leave space for a trailing " \" in case we need to
 // break the line on the next iteration.
-unsigned N = I->length();
+unsigned N = File.size();
 if (Columns + (N + 1) + 2 > MaxColumns) {
   OS << " \\\n ";
   Columns = 2;
 }
 OS << ' ';
-PrintFilename(OS, *I, OutputFormat);
+PrintFilename(OS, File, OutputFormat);
 Columns += N + 1;
   }
   OS << '\n';
@@ -449,10 +447,9 @@ void DFGImpl::OutputDependencyFile() {
   // Create phony targets if requested.
   if (PhonyTarget && !Files.empty()) {
 // Skip the first entry, this is always the input file itself.
-for (std::vector::iterator I = Files.begin() + 1,
-   E = Files.end(); I != E; ++I) {
+for (StringRef File : Files) {
   OS << '\n';
-  PrintFilename(OS, *I, OutputFormat);
+  PrintFilename(OS, File, OutputFormat);
   OS << ":\n";
 }
   }


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


Re: r287343 - [OpenCL] Introduce ReadPipeType and WritePipeType.

2016-11-21 Thread Yaron Keren via cfe-commits
Hi Joey,

In order for  ReadPipeType and WritePipeType to work with LLVM type system
(isa, dyn_cast), you need to modify the existing TypeClass::Pipe kind
into TypeClass::ReadPipe
and TypeClass::WritePipe, have Pipe::classof recognize both kinds and have
ReadPipe::classof and WritePipe::classof recognize their respective kinds.

See rule 4 in http://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html

Good example is
how ConstantArrayType, IncompleteArrayType, VariableArrayType,
DependentSizedArrayType inherit
from ArrayType.

Yaron



2016-11-18 16:10 GMT+02:00 Joey Gouly via cfe-commits <
cfe-commits@lists.llvm.org>:

> Author: joey
> Date: Fri Nov 18 08:10:54 2016
> New Revision: 287343
>
> URL: http://llvm.org/viewvc/llvm-project?rev=287343&view=rev
> Log:
> [OpenCL] Introduce ReadPipeType and WritePipeType.
>
> This allows Sema to diagnose passing a read_only pipe to a
> write_only pipe argument.
>
> Modified:
> cfe/trunk/include/clang/AST/ASTContext.h
> cfe/trunk/include/clang/AST/Type.h
> cfe/trunk/include/clang/Sema/Sema.h
> cfe/trunk/include/clang/Serialization/ASTBitCodes.h
> cfe/trunk/lib/AST/ASTContext.cpp
> cfe/trunk/lib/AST/TypePrinter.cpp
> cfe/trunk/lib/Sema/SemaType.cpp
> cfe/trunk/lib/Sema/TreeTransform.h
> cfe/trunk/lib/Serialization/ASTReader.cpp
> cfe/trunk/lib/Serialization/ASTWriter.cpp
> cfe/trunk/test/Misc/ast-dump-pipe.cl
> cfe/trunk/test/SemaOpenCL/access-qualifier.cl
> cfe/trunk/test/SemaOpenCL/invalid-pipes-cl2.0.cl
>
> Modified: cfe/trunk/include/clang/AST/ASTContext.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/
> clang/AST/ASTContext.h?rev=287343&r1=287342&r2=287343&view=diff
> 
> ==
> --- cfe/trunk/include/clang/AST/ASTContext.h (original)
> +++ cfe/trunk/include/clang/AST/ASTContext.h Fri Nov 18 08:10:54 2016
> @@ -135,7 +135,8 @@ class ASTContext : public RefCountedBase
>mutable llvm::FoldingSet AutoTypes;
>mutable llvm::FoldingSet AtomicTypes;
>llvm::FoldingSet AttributedTypes;
> -  mutable llvm::FoldingSet PipeTypes;
> +  mutable llvm::FoldingSet ReadPipeTypes;
> +  mutable llvm::FoldingSet WritePipeTypes;
>
>mutable llvm::FoldingSet QualifiedTemplateNames;
>mutable llvm::FoldingSet DependentTemplateNames;
> @@ -1120,8 +1121,10 @@ public:
>/// blocks.
>QualType getBlockDescriptorType() const;
>
> -  /// \brief Return pipe type for the specified type.
> -  QualType getPipeType(QualType T) const;
> +  /// \brief Return a read_only pipe type for the specified type.
> +  QualType getReadPipeType(QualType T) const;
> +  /// \brief Return a write_only pipe type for the specified type.
> +  QualType getWritePipeType(QualType T) const;
>
>/// Gets the struct used to keep track of the extended descriptor for
>/// pointer to blocks.
>
> Modified: cfe/trunk/include/clang/AST/Type.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/
> clang/AST/Type.h?rev=287343&r1=287342&r2=287343&view=diff
> 
> ==
> --- cfe/trunk/include/clang/AST/Type.h (original)
> +++ cfe/trunk/include/clang/AST/Type.h Fri Nov 18 08:10:54 2016
> @@ -5285,18 +5285,18 @@ class AtomicType : public Type, public l
>
>  /// PipeType - OpenCL20.
>  class PipeType : public Type, public llvm::FoldingSetNode {
> +protected:
>QualType ElementType;
> +  bool isRead;
>
> -  PipeType(QualType elemType, QualType CanonicalPtr) :
> +  PipeType(QualType elemType, QualType CanonicalPtr, bool isRead) :
>  Type(Pipe, CanonicalPtr, elemType->isDependentType(),
>   elemType->isInstantiationDependentType(),
>   elemType->isVariablyModifiedType(),
>   elemType->containsUnexpandedParameterPack()),
> -ElementType(elemType) {}
> -  friend class ASTContext;  // ASTContext creates these.
> +ElementType(elemType), isRead(isRead) {}
>
>  public:
> -
>QualType getElementType() const { return ElementType; }
>
>bool isSugared() const { return false; }
> @@ -5311,11 +5311,23 @@ public:
>  ID.AddPointer(T.getAsOpaquePtr());
>}
>
> -
>static bool classof(const Type *T) {
>  return T->getTypeClass() == Pipe;
>}
>
> +  bool isReadOnly() const { return isRead; }
> +};
> +
> +class ReadPipeType : public PipeType {
> +  ReadPipeType(QualType elemType, QualType CanonicalPtr) :
> +PipeType(elemType, CanonicalPtr, true) {}
> +  friend class ASTContext;  // ASTContext creates these.
> +};
> +
> +class WritePipeType : public PipeType {
> +  WritePipeType(QualType elemType, QualType CanonicalPtr) :
> +PipeType(elemType, CanonicalPtr, false) {}
> +  friend class ASTContext;  // ASTContext creates these.
>  };
>
>  /// A qualifier set is used to build a set of qualifiers.
>
> Modified: cfe/trunk/include/clang/Sema/Sema.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/
> clang/Sema/Sema.h?rev=287343&r1=287342&r2=287343

r288124 - Correct comment: we are creating a canonicla decltypetype.

2016-11-29 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Tue Nov 29 04:08:20 2016
New Revision: 288124

URL: http://llvm.org/viewvc/llvm-project?rev=288124&view=rev
Log:
Correct comment: we are creating a canonicla decltypetype.


Modified:
cfe/trunk/lib/AST/ASTContext.cpp

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=288124&r1=288123&r2=288124&view=diff
==
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Tue Nov 29 04:08:20 2016
@@ -4330,7 +4330,7 @@ QualType ASTContext::getDecltypeType(Exp
 DependentDecltypeType *Canon
   = DependentDecltypeTypes.FindNodeOrInsertPos(ID, InsertPos);
 if (!Canon) {
-  // Build a new, canonical typeof(expr) type.
+  // Build a new, canonical decltype(expr) type.
   Canon = new (*this, TypeAlignment) DependentDecltypeType(*this, e);
   DependentDecltypeTypes.InsertNode(Canon, InsertPos);
 }


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


r289328 - Simplify parseShowColorsArgs logic, NFC.

2016-12-10 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sat Dec 10 08:55:14 2016
New Revision: 289328

URL: http://llvm.org/viewvc/llvm-project?rev=289328&view=rev
Log:
Simplify parseShowColorsArgs logic, NFC.


Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=289328&r1=289327&r2=289328&view=diff
==
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Sat Dec 10 08:55:14 2016
@@ -930,21 +930,13 @@ static bool parseShowColorsArgs(const Ar
   } ShowColors = DefaultColor ? Colors_Auto : Colors_Off;
   for (Arg *A : Args) {
 const Option &O = A->getOption();
-if (!O.matches(options::OPT_fcolor_diagnostics) &&
-!O.matches(options::OPT_fdiagnostics_color) &&
-!O.matches(options::OPT_fno_color_diagnostics) &&
-!O.matches(options::OPT_fno_diagnostics_color) &&
-!O.matches(options::OPT_fdiagnostics_color_EQ))
-  continue;
-
 if (O.matches(options::OPT_fcolor_diagnostics) ||
 O.matches(options::OPT_fdiagnostics_color)) {
   ShowColors = Colors_On;
 } else if (O.matches(options::OPT_fno_color_diagnostics) ||
O.matches(options::OPT_fno_diagnostics_color)) {
   ShowColors = Colors_Off;
-} else {
-  assert(O.matches(options::OPT_fdiagnostics_color_EQ));
+} else if (O.matches(options::OPT_fdiagnostics_color_EQ)) {
   StringRef Value(A->getValue());
   if (Value == "always")
 ShowColors = Colors_On;
@@ -954,10 +946,9 @@ static bool parseShowColorsArgs(const Ar
 ShowColors = Colors_Auto;
 }
   }
-  if (ShowColors == Colors_On ||
-  (ShowColors == Colors_Auto && 
llvm::sys::Process::StandardErrHasColors()))
-return true;
-  return false;
+  return ShowColors == Colors_On ||
+ (ShowColors == Colors_Auto &&
+  llvm::sys::Process::StandardErrHasColors());
 }
 
 bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,


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


r301526 - Constify SourceManager input to MacroInfo::getDefinitionLengthSlow, NFC.

2017-04-27 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Thu Apr 27 04:56:39 2017
New Revision: 301526

URL: http://llvm.org/viewvc/llvm-project?rev=301526&view=rev
Log:
Constify SourceManager input to MacroInfo::getDefinitionLengthSlow, NFC.


Modified:
cfe/trunk/include/clang/Lex/MacroInfo.h
cfe/trunk/lib/Lex/MacroInfo.cpp

Modified: cfe/trunk/include/clang/Lex/MacroInfo.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/MacroInfo.h?rev=301526&r1=301525&r2=301526&view=diff
==
--- cfe/trunk/include/clang/Lex/MacroInfo.h (original)
+++ cfe/trunk/include/clang/Lex/MacroInfo.h Thu Apr 27 04:56:39 2017
@@ -126,7 +126,7 @@ public:
   SourceLocation getDefinitionEndLoc() const { return EndLocation; }
 
   /// \brief Get length in characters of the macro definition.
-  unsigned getDefinitionLength(SourceManager &SM) const {
+  unsigned getDefinitionLength(const SourceManager &SM) const {
 if (IsDefinitionLengthCached)
   return DefinitionLength;
 return getDefinitionLengthSlow(SM);
@@ -285,7 +285,7 @@ public:
   void dump() const;
 
 private:
-  unsigned getDefinitionLengthSlow(SourceManager &SM) const;
+  unsigned getDefinitionLengthSlow(const SourceManager &SM) const;
 
   void setOwningModuleID(unsigned ID) {
 assert(isFromASTFile());

Modified: cfe/trunk/lib/Lex/MacroInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/MacroInfo.cpp?rev=301526&r1=301525&r2=301526&view=diff
==
--- cfe/trunk/lib/Lex/MacroInfo.cpp (original)
+++ cfe/trunk/lib/Lex/MacroInfo.cpp Thu Apr 27 04:56:39 2017
@@ -33,7 +33,7 @@ MacroInfo::MacroInfo(SourceLocation DefL
 UsedForHeaderGuard(false) {
 }
 
-unsigned MacroInfo::getDefinitionLengthSlow(SourceManager &SM) const {
+unsigned MacroInfo::getDefinitionLengthSlow(const SourceManager &SM) const {
   assert(!IsDefinitionLengthCached);
   IsDefinitionLengthCached = true;
 


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


Re: r301815 - Adapt to LLVM's rename of WeakVH to WeakTrackingVH; NFC

2017-05-03 Thread Yaron Keren via cfe-commits
out-of-tree code that uses WeakVH will continue to compile OK but may not
perform OK with WeakVH not tracking anymore.
May be better not to reuse WeakVH yet so such code will fail compilation.


‫בתאריך יום ב׳, 1 במאי 2017 ב-20:21 מאת ‪Sanjoy Das via cfe-commits‬‏ <‪
cfe-commits@lists.llvm.org‬‏>:‬

> Author: sanjoy
> Date: Mon May  1 12:08:00 2017
> New Revision: 301815
>
> URL: http://llvm.org/viewvc/llvm-project?rev=301815&view=rev
> Log:
> Adapt to LLVM's rename of WeakVH to WeakTrackingVH; NFC
>
> Modified:
> cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
> cfe/trunk/lib/CodeGen/CGObjCMac.cpp
> cfe/trunk/lib/CodeGen/CodeGenFunction.h
> cfe/trunk/lib/CodeGen/CodeGenModule.cpp
> cfe/trunk/lib/CodeGen/CodeGenModule.h
>
> Modified: cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDeclCXX.cpp?rev=301815&r1=301814&r2=301815&view=diff
>
> ==
> --- cfe/trunk/lib/CodeGen/CGDeclCXX.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGDeclCXX.cpp Mon May  1 12:08:00 2017
> @@ -571,9 +571,10 @@ CodeGenFunction::GenerateCXXGlobalInitFu
>FinishFunction();
>  }
>
> -void CodeGenFunction::GenerateCXXGlobalDtorsFunc(llvm::Function *Fn,
> -  const std::vector llvm::Constant*> >
> -&DtorsAndObjects) {
> +void CodeGenFunction::GenerateCXXGlobalDtorsFunc(
> +llvm::Function *Fn,
> +const std::vector>
> +&DtorsAndObjects) {
>{
>  auto NL = ApplyDebugLocation::CreateEmpty(*this);
>  StartFunction(GlobalDecl(), getContext().VoidTy, Fn,
>
> Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=301815&r1=301814&r2=301815&view=diff
>
> ==
> --- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Mon May  1 12:08:00 2017
> @@ -886,7 +886,7 @@ protected:
>
>/// Cached reference to the class for constant strings. This value has
> type
>/// int * but is actually an Obj-C class pointer.
> -  llvm::WeakVH ConstantStringClassRef;
> +  llvm::WeakTrackingVH ConstantStringClassRef;
>
>/// \brief The LLVM type corresponding to NSConstantString.
>llvm::StructType *NSConstantStringType = nullptr;
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=301815&r1=301814&r2=301815&view=diff
>
> ==
> --- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Mon May  1 12:08:00 2017
> @@ -3471,9 +3471,10 @@ public:
>
>/// GenerateCXXGlobalDtorsFunc - Generates code for destroying global
>/// variables.
> -  void GenerateCXXGlobalDtorsFunc(llvm::Function *Fn,
> -  const
> std::vector -  llvm::Constant*> > &DtorsAndObjects);
> +  void GenerateCXXGlobalDtorsFunc(
> +  llvm::Function *Fn,
> +  const std::vector>
> +  &DtorsAndObjects);
>
>void GenerateCXXGlobalVarDeclInitFunc(llvm::Function *Fn,
>  const VarDecl *D,
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=301815&r1=301814&r2=301815&view=diff
>
> ==
> --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon May  1 12:08:00 2017
> @@ -1154,7 +1154,7 @@ void CodeGenModule::addCompilerUsedGloba
>  }
>
>  static void emitUsed(CodeGenModule &CGM, StringRef Name,
> - std::vector &List) {
> + std::vector &List) {
>// Don't create llvm.used if there is no need.
>if (List.empty())
>  return;
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenModule.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.h?rev=301815&r1=301814&r2=301815&view=diff
>
> ==
> --- cfe/trunk/lib/CodeGen/CodeGenModule.h (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenModule.h Mon May  1 12:08:00 2017
> @@ -344,8 +344,8 @@ private:
>/// List of global values which are required to be present in the
> object file;
>/// bitcast to i8*. This is used for forcing visibility of symbols
> which may
>/// otherwise be optimized out.
> -  std::vector LLVMUsed;
> -  std::vector LLVMCompilerUsed;
> +  std::vector LLVMUsed;
> +  std::vector LLVMCompilerUsed;
>
>/// Store the list of global constructors and their respective
> priorities to
>/// be emitted when the translation unit is complete.
> @@ -416,7 +4

Re: r285258 - Refactor call emission to package the function pointer together with

2016-11-04 Thread Yaron Keren via cfe-commits
Hi John,

clang warns on this:

/llvm/tools/zapccs/../clang/include/../lib/CodeGen/CGCall.h:79:7: warning:
anonymous types declared in an anonymous union are an extension
[-Wnested-anon-types]
  struct {
  ^
/llvm/tools/zapccs/../clang/include/../lib/CodeGen/CGCall.h:83:7: warning:
anonymous types declared in an anonymous union are an extension
[-Wnested-anon-types]
  struct {
  ^



2016-10-27 2:46 GMT+03:00 John McCall via cfe-commits <
cfe-commits@lists.llvm.org>:

> Author: rjmccall
> Date: Wed Oct 26 18:46:34 2016
> New Revision: 285258
>
> URL: http://llvm.org/viewvc/llvm-project?rev=285258&view=rev
> Log:
> Refactor call emission to package the function pointer together with
> abstract information about the callee.  NFC.
>
> The goal here is to make it easier to recognize indirect calls and
> trigger additional logic in certain cases.  That logic will come in
> a later patch; in the meantime, I felt that this was a significant
> improvement to the code.
>
> Modified:
> cfe/trunk/include/clang/AST/Expr.h
> cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h
> cfe/trunk/lib/AST/Expr.cpp
> cfe/trunk/lib/CodeGen/CGAtomic.cpp
> cfe/trunk/lib/CodeGen/CGBlocks.cpp
> cfe/trunk/lib/CodeGen/CGBuiltin.cpp
> cfe/trunk/lib/CodeGen/CGCUDARuntime.cpp
> cfe/trunk/lib/CodeGen/CGCXX.cpp
> cfe/trunk/lib/CodeGen/CGCXXABI.cpp
> cfe/trunk/lib/CodeGen/CGCXXABI.h
> cfe/trunk/lib/CodeGen/CGCall.cpp
> cfe/trunk/lib/CodeGen/CGCall.h
> cfe/trunk/lib/CodeGen/CGClass.cpp
> cfe/trunk/lib/CodeGen/CGDecl.cpp
> cfe/trunk/lib/CodeGen/CGException.cpp
> cfe/trunk/lib/CodeGen/CGExpr.cpp
> cfe/trunk/lib/CodeGen/CGExprCXX.cpp
> cfe/trunk/lib/CodeGen/CGExprComplex.cpp
> cfe/trunk/lib/CodeGen/CGObjC.cpp
> cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
> cfe/trunk/lib/CodeGen/CGObjCMac.cpp
> cfe/trunk/lib/CodeGen/CGVTables.cpp
> cfe/trunk/lib/CodeGen/CodeGenFunction.h
> cfe/trunk/lib/CodeGen/CodeGenModule.h
> cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
> cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
>
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r247410 - This test requires UTF-8 output to print the UT-8 characters.

2015-09-11 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Fri Sep 11 08:29:12 2015
New Revision: 247410

URL: http://llvm.org/viewvc/llvm-project?rev=247410&view=rev
Log:
This test requires UTF-8 output to print the UT-8 characters.


Modified:
cfe/trunk/test/Frontend/source-col-map.c

Modified: cfe/trunk/test/Frontend/source-col-map.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/source-col-map.c?rev=247410&r1=247409&r2=247410&view=diff
==
--- cfe/trunk/test/Frontend/source-col-map.c (original)
+++ cfe/trunk/test/Frontend/source-col-map.c Fri Sep 11 08:29:12 2015
@@ -1,4 +1,5 @@
 // RUN: not %clang_cc1 -fsyntax-only -fmessage-length 75 -o /dev/null -x c < 
%s 2>&1 | FileCheck %s -strict-whitespace
+// REQUIRES: utf8-capable-terminal
 
 // Test case for the text diagnostics source column conversion crash.
 


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


Re: r247410 - This test requires UTF-8 output to print the UT-8 characters.

2015-09-11 Thread Yaron Keren via cfe-commits
The test was passing before r247253 without LLVM_ON_WIN32 defined in
lib/Support/Locale.cpp, so the llvm::sys::unicode::* functions were used,
which may mean that the LLVM_ON_WIN32 functions are overly restrictive.
For example, Windows can output the UTF-8 character from source-col-map.c
correctly. Maybe the correct fix it to actually eliminate the
LLVM_ON_WIN32 versions.

What I still don't understand - how the Windows bots were passing this test
and green?


2015-09-11 16:31 GMT+03:00 Aaron Ballman :

> Thank you for this! I wasn't certain of what the right way to fix it was.
> :-)
>
> ~Aaron
>
> On Fri, Sep 11, 2015 at 9:29 AM, Yaron Keren via cfe-commits
>  wrote:
> > Author: yrnkrn
> > Date: Fri Sep 11 08:29:12 2015
> > New Revision: 247410
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=247410&view=rev
> > Log:
> > This test requires UTF-8 output to print the UT-8 characters.
> >
> >
> > Modified:
> > cfe/trunk/test/Frontend/source-col-map.c
> >
> > Modified: cfe/trunk/test/Frontend/source-col-map.c
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/source-col-map.c?rev=247410&r1=247409&r2=247410&view=diff
> >
> ==
> > --- cfe/trunk/test/Frontend/source-col-map.c (original)
> > +++ cfe/trunk/test/Frontend/source-col-map.c Fri Sep 11 08:29:12 2015
> > @@ -1,4 +1,5 @@
> >  // RUN: not %clang_cc1 -fsyntax-only -fmessage-length 75 -o /dev/null
> -x c < %s 2>&1 | FileCheck %s -strict-whitespace
> > +// REQUIRES: utf8-capable-terminal
> >
> >  // Test case for the text diagnostics source column conversion crash.
> >
> >
> >
> > ___
> > cfe-commits mailing list
> > cfe-commits@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r245459 - According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.

2015-09-19 Thread Yaron Keren via cfe-commits
Thanks, I have replied there.

2015-09-19 13:33 GMT+03:00 Hal Finkel :

> FYI: https://llvm.org/bugs/show_bug.cgi?id=24398 was just reopened
> pointing to a lack of resolution here.
>
>  -Hal
>
> - Original Message -
> > From: "Yaron Keren via cfe-commits" 
> > To: "Martell Malone" 
> > Cc: "Richard Smith" , "cfe-commits" <
> cfe-commits@lists.llvm.org>
> > Sent: Friday, August 21, 2015 2:47:50 AM
> > Subject: Re: r245459 - According to i686 ABI, long double size on x86 is
> 12 bytes not 16 bytes.
> >
> >
> >
> >
> > The testcase from r245459 was not reverted and still in SVN.
> >
> >
> >
> >
> >
> > 2015-08-21 2:05 GMT+03:00 Martell Malone < martellmal...@gmail.com >
> > :
> >
> >
> >
> >
> >
> > I feel very silly now.
> > After testing the testcase again on svn it still works.
> > It appears the OP was looking for this patch to go onto the 3.6
> > branch and was applying my patch to that.
> >
> >
> > I'll know in future to recheck the testcase afterwards myself in
> > future.
> >
> >
> > Apologies for the noise guys.
> >
> >
> > Yaron I think the test case from r245459 would be useful to ensure it
> > is never broken in the future?
> >
> > Would you be able to recommit the test case?
> >
> >
> >
> > Kind Regards
> >
> > Martell
> >
> >
> >
> >
> >
> >
> >
> > On Thu, Aug 20, 2015 at 3:57 PM, Martell Malone <
> > martellmal...@gmail.com > wrote:
> >
> >
> >
> >
> >
> > There is no testcase for PR24398 nor the OP reporting the problem was
> > actually solved. Martell?
> > I'm just re-looking through it now.
> >
> >
> > X86TargetInfo sets LongDoubleFormat =
> > &llvm::APFloat::x87DoubleExtended;
> > X86_64TargetInfo then sets LongDoubleWidth = LongDoubleAlign = 128 ;
> > X86_32 TargetInfo then sets LongDoubleWidth = 96 ; LongDoubleAlign =
> > 32 ;
> >
> >
> > From this I can see that the patch I committed actually doesn't
> > change anything but only breaks mingw x86.
> >
> >
> > I can only see these values changed in Microsoft*TargetInfo classes
> > which is not a parent of MINGW
> >
> >
> > When I submitted the patch I just wanted to explicitly set the values
> > in MinGWX86_64TargetInfo to ensure it was in fact that.
> >
> > It seemed as though it was not inheriting the value from the root
> > parent class somehow.
> >
> >
> >
> > I was told on irc that it did fix the bug which is even stranger.
> > I'm actually at a bit of a loss as to what the proper fix to this is
> > then.
> >
> > Apologies for breaking mingw i686 long double.
> >
> >
> > I will do up a test case and try to find the actual cause of the long
> > double bug and reopen the issue.
> >
> >
> >
> >
> >
> > On Thu, Aug 20, 2015 at 3:09 PM, Yaron Keren < yaron.ke...@gmail.com
> > > wrote:
> >
> >
> >
> >
> > Hi, I've just done this exactly this in r245618 (32 bit) and r245620
> > (64 bits).
> >
> >
> > mingw i686 long double values were correct before r245084 and wrong
> > after it.
> > mingw x86_64 long double values were not modified at all by r245084
> > for the reason you stated, so I agree and do not see how this
> > non-change can solve anything . There is no testcase for PR24398 nor
> > the OP reporting the problem was actually solved. Martell?
> >
> >
> > About PR24398, long double support was in clang long ago and b oth
> > code examples compile and run correctly with current svn (without
> > r245084) and gcc version 5.1.0 (i686-posix-dwarf-rev0, Built by
> > MinGW-W64 project).
> > It's not x86_64 but as said r245084 didn't actually modify x86_64
> > configuration.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 2015-08-21 0:52 GMT+03:00 Richard Smith < rich...@metafoo.co.uk > :
> >
> >
> > OK, so here's the problem:
> >
> >
> > The right way to fix this seems to be to delete the assignments to
> > LongDouble* from the MinGWX86_32TargetInfo constructor; the
> > X86_32TargetInfo and X86TargetInfo base classes already set them to
> > the right values. Likewise we can delete the assignments to
> > LongDouble* from the MinGWX8

Re: r245459 - According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.

2015-09-19 Thread Yaron Keren via cfe-commits
I can't reproduce sizeof = 12 when targetting 64 bits, it is 16
(LongDoubleWidth = 128) and have been this way since r55036.  It may be
that both 32 bit mingw and 64 bit mingw are installed and clang is
targetting the 32 bits while gcc targets 64 bits.



2015-09-19 15:24 GMT+03:00 Martell Malone :

> For reference It was raised again here also
> https://github.com/Alexpux/MINGW-packages/issues/722
> <https://github.com/Alexpux/MINGW-packages/issues/722#issuecomment-141642907>
>
> "that is extended from X86TargetInfo
> Which sets LongDoubleFormat = &llvm::APFloat::x87DoubleExtended;"
>
> On Saturday, September 19, 2015, Yaron Keren 
> wrote:
>
>> Thanks, I have replied there.
>>
>> 2015-09-19 13:33 GMT+03:00 Hal Finkel :
>>
>>> FYI: https://llvm.org/bugs/show_bug.cgi?id=24398 was just reopened
>>> pointing to a lack of resolution here.
>>>
>>>  -Hal
>>>
>>> - Original Message -
>>> > From: "Yaron Keren via cfe-commits" 
>>> > To: "Martell Malone" 
>>> > Cc: "Richard Smith" , "cfe-commits" <
>>> cfe-commits@lists.llvm.org>
>>> > Sent: Friday, August 21, 2015 2:47:50 AM
>>> > Subject: Re: r245459 - According to i686 ABI, long double size on x86
>>> is 12 bytes not 16 bytes.
>>> >
>>> >
>>> >
>>> >
>>> > The testcase from r245459 was not reverted and still in SVN.
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > 2015-08-21 2:05 GMT+03:00 Martell Malone < martellmal...@gmail.com >
>>> > :
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > I feel very silly now.
>>> > After testing the testcase again on svn it still works.
>>> > It appears the OP was looking for this patch to go onto the 3.6
>>> > branch and was applying my patch to that.
>>> >
>>> >
>>> > I'll know in future to recheck the testcase afterwards myself in
>>> > future.
>>> >
>>> >
>>> > Apologies for the noise guys.
>>> >
>>> >
>>> > Yaron I think the test case from r245459 would be useful to ensure it
>>> > is never broken in the future?
>>> >
>>> > Would you be able to recommit the test case?
>>> >
>>> >
>>> >
>>> > Kind Regards
>>> >
>>> > Martell
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Thu, Aug 20, 2015 at 3:57 PM, Martell Malone <
>>> > martellmal...@gmail.com > wrote:
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > There is no testcase for PR24398 nor the OP reporting the problem was
>>> > actually solved. Martell?
>>> > I'm just re-looking through it now.
>>> >
>>> >
>>> > X86TargetInfo sets LongDoubleFormat =
>>> > &llvm::APFloat::x87DoubleExtended;
>>> > X86_64TargetInfo then sets LongDoubleWidth = LongDoubleAlign = 128 ;
>>> > X86_32 TargetInfo then sets LongDoubleWidth = 96 ; LongDoubleAlign =
>>> > 32 ;
>>> >
>>> >
>>> > From this I can see that the patch I committed actually doesn't
>>> > change anything but only breaks mingw x86.
>>> >
>>> >
>>> > I can only see these values changed in Microsoft*TargetInfo classes
>>> > which is not a parent of MINGW
>>> >
>>> >
>>> > When I submitted the patch I just wanted to explicitly set the values
>>> > in MinGWX86_64TargetInfo to ensure it was in fact that.
>>> >
>>> > It seemed as though it was not inheriting the value from the root
>>> > parent class somehow.
>>> >
>>> >
>>> >
>>> > I was told on irc that it did fix the bug which is even stranger.
>>> > I'm actually at a bit of a loss as to what the proper fix to this is
>>> > then.
>>> >
>>> > Apologies for breaking mingw i686 long double.
>>> >
>>> >
>>> > I will do up a test case and try to find the actual cause of the long
>>> > double bug and reopen the issue.
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Thu, Aug 20, 2015 a

Re: [libcxxabi] r248129 - Let cxa_demangle.cpp compile with gcc/libstdc++ 4.8 and clang-cl/MSVC2013's STL.

2015-09-24 Thread Yaron Keren via cfe-commits
Visual C++ 2013 update 5 (latest) does not appear to compile this, mainly
due to missing support for constexpr.

  https://msdn.microsoft.com/en-us/library/vstudio/hh567368.aspx

Visual C++ 2013 CTP has constexpr, but MS did not further update this
branch since Nov 2013.
The "regular" branch of 2013 update 5 is from Jul 2015.

Worth mentioning that either 2013 CTP or 2015 is required.


2015-09-20 21:10 GMT+03:00 Nico Weber via cfe-commits <
cfe-commits@lists.llvm.org>:

> Author: nico
> Date: Sun Sep 20 13:10:46 2015
> New Revision: 248129
>
> URL: http://llvm.org/viewvc/llvm-project?rev=248129&view=rev
> Log:
> Let cxa_demangle.cpp compile with gcc/libstdc++ 4.8 and
> clang-cl/MSVC2013's STL.
>
> libstdc++ needs a few typedefs in malloc_alloc. MSVC's STL needs rebind(),
> construct(), destroy().  MSVC2013 also has no snprintf, but it exists in
> 2015.
>
> Modified:
> libcxxabi/trunk/src/cxa_demangle.cpp
>
> Modified: libcxxabi/trunk/src/cxa_demangle.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp?rev=248129&r1=248128&r2=248129&view=diff
>
> ==
> --- libcxxabi/trunk/src/cxa_demangle.cpp (original)
> +++ libcxxabi/trunk/src/cxa_demangle.cpp Sun Sep 20 13:10:46 2015
> @@ -18,6 +18,13 @@
>  #include 
>  #include 
>
> +#ifdef _MSC_VER
> +// snprintf is implemented in VS 2015
> +#if _MSC_VER < 1900
> +#define snprintf _snprintf_s
> +#endif
> +#endif
> +
>  namespace __cxxabiv1
>  {
>
> @@ -4818,6 +4825,12 @@ class malloc_alloc
>  {
>  public:
>  typedef T value_type;
> +typedef T& reference;
> +typedef const T& const_reference;
> +typedef T* pointer;
> +typedef const T* const_pointer;
> +typedef std::size_t size_type;
> +typedef std::ptrdiff_t difference_type;
>
>  malloc_alloc() = default;
>  template  malloc_alloc(const malloc_alloc&) noexcept {}
> @@ -4830,6 +4843,17 @@ public:
>  {
>  std::free(p);
>  }
> +
> +template  struct rebind { using other = malloc_alloc; };
> +template 
> +void construct(U* p, Args&&... args)
> +{
> +::new ((void*)p) U(std::forward(args)...);
> +}
> +void destroy(T* p)
> +{
> +p->~T();
> +}
>  };
>
>  template 
>
>
> ___
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D13128: Fix backend crash on multiple close of stdout.

2015-09-24 Thread Yaron Keren via cfe-commits
yaron.keren added a subscriber: yaron.keren.
yaron.keren added a comment.

When stdout goes elsewhere the console, the shell creates the the output file 
(pipe) and will close it when clang terminates so  so why clang should close it 
at  all ? it did not open it.

Practically, we have been running locally

  Error(false), UseAtomicWrites(false) {
  if (FD < 0 ) {
ShouldClose = false;
return;
  }
  if (FD <= STDERR_FILENO)
ShouldClose = false;

and passing regression tests on Windows 7 and Linux, maybe this is required on 
other usage scenarios or OS.


http://reviews.llvm.org/D13128



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


Re: [PATCH] D13128: Fix backend crash on multiple close of stdout.

2015-09-24 Thread Yaron Keren via cfe-commits
yaron.keren added a subscriber: sunfish.
yaron.keren added a comment.

The original commit 
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20100816/106268.html 
by Dan Ghoman says:

"Make raw_fd_ostream consider itself the owner of STDOUT_FILENO when
constructed with an output filename of "-". In particular, allow the
file descriptor to be closed, and close the file descriptor in the
destructor if it hasn't been explicitly closed already, to ensure
that any write errors are detected."

Closing stdout causes not only this problem in the 2nd close (which may be 
worked around) but potentially losing text output depending on who gets to 
close the stream first. Is it normal behaviour for console programs to close 
their stdout?


http://reviews.llvm.org/D13128



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


Re: [libcxxabi] r248129 - Let cxa_demangle.cpp compile with gcc/libstdc++ 4.8 and clang-cl/MSVC2013's STL.

2015-09-24 Thread Yaron Keren via cfe-commits
Ah, OK. Maybe it would compile with VC 2013 by using LLVM_CONSTEXPR instead
of constexpr. It's not available now in libcxx but the definition from
Compiler.h is trivial.




2015-09-24 19:28 GMT+03:00 Nico Weber :

> On Thu, Sep 24, 2015 at 4:20 AM, Yaron Keren via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
>> Visual C++ 2013 update 5 (latest) does not appear to compile this, mainly
>> due to missing support for constexpr.
>>
>>   https://msdn.microsoft.com/en-us/library/vstudio/hh567368.aspx
>>
>> Visual C++ 2013 CTP has constexpr, but MS did not further update this
>> branch since Nov 2013.
>> The "regular" branch of 2013 update 5 is from Jul 2015.
>>
>> Worth mentioning that either 2013 CTP or 2015 is required.
>>
>
> Right the commit message hints at this with "clang-cl/MSVC2013's STL" –
> with this change, _clang-cl_ can compile this file with the MSVC2013
> headers. cl.exe can't. cl.exe 2015 can, except for that one
> __attribute__((visibiliiy("default"))) line. If that's changed to go
> `#ifdef _MSC_VER __declspec(dllexport) #else __attr... #endif` then it
> compiles with 2015. (I want to send out something for this soon too.)
>
>
>>
>>
>> 2015-09-20 21:10 GMT+03:00 Nico Weber via cfe-commits <
>> cfe-commits@lists.llvm.org>:
>>
>>> Author: nico
>>> Date: Sun Sep 20 13:10:46 2015
>>> New Revision: 248129
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=248129&view=rev
>>> Log:
>>> Let cxa_demangle.cpp compile with gcc/libstdc++ 4.8 and
>>> clang-cl/MSVC2013's STL.
>>>
>>> libstdc++ needs a few typedefs in malloc_alloc. MSVC's STL needs
>>> rebind(),
>>> construct(), destroy().  MSVC2013 also has no snprintf, but it exists in
>>> 2015.
>>>
>>> Modified:
>>> libcxxabi/trunk/src/cxa_demangle.cpp
>>>
>>> Modified: libcxxabi/trunk/src/cxa_demangle.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp?rev=248129&r1=248128&r2=248129&view=diff
>>>
>>> ==
>>> --- libcxxabi/trunk/src/cxa_demangle.cpp (original)
>>> +++ libcxxabi/trunk/src/cxa_demangle.cpp Sun Sep 20 13:10:46 2015
>>> @@ -18,6 +18,13 @@
>>>  #include 
>>>  #include 
>>>
>>> +#ifdef _MSC_VER
>>> +// snprintf is implemented in VS 2015
>>> +#if _MSC_VER < 1900
>>> +#define snprintf _snprintf_s
>>> +#endif
>>> +#endif
>>> +
>>>  namespace __cxxabiv1
>>>  {
>>>
>>> @@ -4818,6 +4825,12 @@ class malloc_alloc
>>>  {
>>>  public:
>>>  typedef T value_type;
>>> +typedef T& reference;
>>> +typedef const T& const_reference;
>>> +typedef T* pointer;
>>> +typedef const T* const_pointer;
>>> +typedef std::size_t size_type;
>>> +typedef std::ptrdiff_t difference_type;
>>>
>>>  malloc_alloc() = default;
>>>  template  malloc_alloc(const malloc_alloc&) noexcept {}
>>> @@ -4830,6 +4843,17 @@ public:
>>>  {
>>>  std::free(p);
>>>  }
>>> +
>>> +template  struct rebind { using other = malloc_alloc; };
>>> +template 
>>> +void construct(U* p, Args&&... args)
>>> +{
>>> +::new ((void*)p) U(std::forward(args)...);
>>> +}
>>> +void destroy(T* p)
>>> +{
>>> +p->~T();
>>> +}
>>>  };
>>>
>>>  template 
>>>
>>>
>>> ___
>>> cfe-commits mailing list
>>> cfe-commits@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>>
>>
>>
>> ___
>> cfe-commits mailing list
>> cfe-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: broken testing caused by r248546

2015-09-25 Thread Yaron Keren via cfe-commits
Here too:

http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/3285

http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/3285/steps/test-clang/logs/Clang%20%3A%3A%20Driver__ps4-linker-win.c


2015-09-25 2:10 GMT+03:00 Romanova, Katya via cfe-commits <
cfe-commits@lists.llvm.org>:

> Hi,
>
>
>
> My today’s commit  r248546 caused some problem for PS4 bot:
>
>
> http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/342
>
> and for x64-ninja-win7 bot
>
> http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/5355
>
>
>
> It was a single problem that caused all the failures.  The tests (or PS4
> bot setup) will be changed to adjust accordingly. The compiler will not be
> changed.
>
>
>
> If all other platforms, except PS4, are not affected, please do not revert
> the change! We are looking into this problem.
>
>
>
> I saw that sanitizer-windows bot failed too. However, it looks like it’s a
> svn timeout problem and it’s not related to our patch.
>
> http://lab.llvm.org:8011/builders/sanitizer-windows/builds/10285
>
>
>
> Katya.
>
>
>
>
>
>
>
>
>
>
>
>
>
> -Original Message-
>
> From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org
> ] On Behalf Of Ekaterina Romanova via
> cfe-commits
>
> Sent: Thursday, September 24, 2015 15:07
>
> To: cfe-commits@lists.llvm.org
>
> Subject: r248546 - This patch adds missing pieces to clang, including the
> PS4 toolchain
>
>
>
> Author: kromanova
>
> Date: Thu Sep 24 17:06:52 2015
>
> New Revision: 248546
>
>
>
> URL: http://llvm.org/viewvc/llvm-project?rev=248546&view=rev
>
> Log:
>
> This patch adds missing pieces to clang, including the PS4 toolchain
> definition, added warnings, PS4 defaults, and Driver changes needed for our
> compiler.
>
>
>
> A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova!
>
>
>
> Differential Revision: http://reviews.llvm.org/D11279
>
>
>
>
>
> Added:
>
> cfe/trunk/test/Driver/Inputs/scei-ps4_tree/
>
> cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/
>
> cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include/
>
> cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include/.keep
>
> cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include_common/
>
> cfe/trunk/test/Driver/Inputs/scei-ps4_tree/target/include_common/.keep
>
> cfe/trunk/test/Driver/ps4-header-search.c
>
> cfe/trunk/test/Driver/ps4-linker-non-win.c
>
> cfe/trunk/test/Driver/ps4-linker-win.c
>
> cfe/trunk/test/Driver/ps4-pic.c
>
> cfe/trunk/test/Driver/ps4-sdk-root.c
>
> Modified:
>
> cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
>
> cfe/trunk/include/clang/Basic/DiagnosticGroups.td
>
> cfe/trunk/lib/Driver/Driver.cpp
>
> cfe/trunk/lib/Driver/ToolChains.cpp
>
> cfe/trunk/lib/Driver/ToolChains.h
>
> cfe/trunk/lib/Driver/Tools.cpp
>
> cfe/trunk/lib/Driver/Tools.h
>
> cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
>
> cfe/trunk/test/Driver/debug-options.c
>
> cfe/trunk/test/Driver/rtti-options.cpp
>
> cfe/trunk/test/Driver/stack-protector.c
>
>
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
>
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=248546&r1=248545&r2=248546&view=diff
>
>
> ==
>
> --- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
>
> +++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Thu Sep 24
>
> +++ 17:06:52 2015
>
> @@ -192,4 +192,18 @@ def warn_target_unsupported_nan2008 : Wa  def
> warn_target_unsupported_nanlegacy : Warning<
>
>"ignoring '-mnan=legacy' option because the '%0' architecture does not
> support it">,
>
>InGroup;
>
> +
>
> +def warn_drv_unable_to_find_directory_expected : Warning<
>
> +  "unable to find %0 directory, expected to be in '%1'">,
>
> +  InGroup;
>
> +
>
> +def warn_drv_ps4_force_pic : Warning<
>
> +  "option '%0' was ignored by the PS4 toolchain, using '-fPIC'">,
>
> +  InGroup;
>
> +
>
> +def warn_drv_ps4_sdk_dir : Warning<
>
> +  "environment variable SCE_PS4_SDK_DIR is set, but points to invalid
>
> +or nonexistent directory '%0'">,
>
> +  InGroup;
>
> +
>
> +def err_drv_unsupported_linker : Error<"unsupported value '%0' for
>
> +-linker option">;
>
> }
>
>
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
>
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=248546&r1=248545&r2=248546&view=diff
>
>
> ==
>
> --- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
>
> +++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Thu Sep 24
>
> +++ 17:06:52 2015
>
> @@ -820,3 +820,7 @@ def CudaCompat : DiagGroup<"cuda-compat"
>
>  // A warning group for things that will change semantics in the future.
>
> def FutureCompat : DiagGroup<"future-compat">;
>
> +

r248626 - Relax test to allow for __attribute__((thiscall)). Under Win32 c-index-test output is

2015-09-25 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Fri Sep 25 17:09:07 2015
New Revision: 248626

URL: http://llvm.org/viewvc/llvm-project?rev=248626&view=rev
Log:
Relax test to allow for __attribute__((thiscall)). Under Win32 c-index-test 
output is

CXXMethod=foo:4:7 (unavailable) [type=int () __attribute__((thiscall))] 
[typekind=FunctionProto] [resulttype=int] [resulttypekind=Int] [isPOD=0]
CXXConstructor=Foo:5:3 (unavailable) [type=void () __attribute__((thiscall))] 
[typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [isPOD=0]


Modified:
cfe/trunk/test/Index/availability.cpp

Modified: cfe/trunk/test/Index/availability.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/availability.cpp?rev=248626&r1=248625&r2=248626&view=diff
==
--- cfe/trunk/test/Index/availability.cpp (original)
+++ cfe/trunk/test/Index/availability.cpp Fri Sep 25 17:09:07 2015
@@ -9,5 +9,5 @@ struct Foo {
 // RUN: c-index-test -test-print-type --std=c++11 %s | FileCheck %s
 // CHECK: FunctionDecl=foo:1:6 (unavailable) [type=void ()] 
[typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [isPOD=0]
 // CHECK: StructDecl=Foo:3:8 (Definition) [type=Foo] [typekind=Record] 
[isPOD=1]
-// CHECK: CXXMethod=foo:4:7 (unavailable) [type=int ()] 
[typekind=FunctionProto] [resulttype=int] [resulttypekind=Int] [isPOD=0]
-// CHECK: CXXConstructor=Foo:5:3 (unavailable) [type=void ()] 
[typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [isPOD=0]
+// CHECK: CXXMethod=foo:4:7 (unavailable) [type=int (){{.*}}] 
[typekind=FunctionProto] [resulttype=int] [resulttypekind=Int] [isPOD=0]
+// CHECK: CXXConstructor=Foo:5:3 (unavailable) [type=void (){{.*}}] 
[typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [isPOD=0]


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


Re: [PATCH] D13128: Fix backend crash on multiple close of stdout.

2015-09-26 Thread Yaron Keren via cfe-commits
yaron.keren added a comment.

Hi Dan, it makes sense that output streams should not usually be mixed 
together, especially if one is binary as you write.
This may or may not be a problem depending on what the user really wants. He 
may want to mix the outputs for whatever purposes or it may usually be a user 
error. 
In any case, that's not how clang deal with usage or even internal unexpected 
errors. It asserts, print error messages but does not crash on purpose. Having 
clang crash here does not seem like a good solution and will result in this 
issue continue to surface again.


http://reviews.llvm.org/D13128



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


r248807 - Fix typo.

2015-09-29 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Tue Sep 29 11:51:08 2015
New Revision: 248807

URL: http://llvm.org/viewvc/llvm-project?rev=248807&view=rev
Log:
Fix typo.


Modified:
cfe/trunk/lib/Lex/Preprocessor.cpp

Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=248807&r1=248806&r2=248807&view=diff
==
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Tue Sep 29 11:51:08 2015
@@ -716,7 +716,7 @@ bool Preprocessor::HandleIdentifier(Toke
 }
 
 void Preprocessor::Lex(Token &Result) {
-  // We loop here until a lex function retuns a token; this avoids recursion.
+  // We loop here until a lex function returns a token; this avoids recursion.
   bool ReturnedToken;
   do {
 switch (CurLexerKind) {


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


r249001 - C++11 rangify for loops, NFC.

2015-10-01 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Thu Oct  1 06:19:28 2015
New Revision: 249001

URL: http://llvm.org/viewvc/llvm-project?rev=249001&view=rev
Log:
C++11 rangify for loops, NFC.


Modified:
cfe/trunk/lib/Frontend/InitHeaderSearch.cpp

Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=249001&r1=249000&r2=249001&view=diff
==
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Thu Oct  1 06:19:28 2015
@@ -246,10 +246,8 @@ void InitHeaderSearch::AddDefaultCInclud
   if (CIncludeDirs != "") {
 SmallVector dirs;
 CIncludeDirs.split(dirs, ":");
-for (SmallVectorImpl::iterator i = dirs.begin();
- i != dirs.end();
- ++i)
-  AddPath(*i, ExternCSystem, false);
+for (StringRef dir : dirs)
+  AddPath(dir, ExternCSystem, false);
 return;
   }
 
@@ -559,39 +557,33 @@ void InitHeaderSearch::Realize(const Lan
   SearchList.reserve(IncludePath.size());
 
   // Quoted arguments go first.
-  for (path_iterator it = IncludePath.begin(), ie = IncludePath.end();
-   it != ie; ++it) {
-if (it->first == Quoted)
-  SearchList.push_back(it->second);
-  }
+  for (auto &Include : IncludePath)
+if (Include.first == Quoted)
+  SearchList.push_back(Include.second);
+
   // Deduplicate and remember index.
   RemoveDuplicates(SearchList, 0, Verbose);
   unsigned NumQuoted = SearchList.size();
 
-  for (path_iterator it = IncludePath.begin(), ie = IncludePath.end();
-   it != ie; ++it) {
-if (it->first == Angled || it->first == IndexHeaderMap)
-  SearchList.push_back(it->second);
-  }
+  for (auto &Include : IncludePath)
+if (Include.first == Angled || Include.first == IndexHeaderMap)
+  SearchList.push_back(Include.second);
 
   RemoveDuplicates(SearchList, NumQuoted, Verbose);
   unsigned NumAngled = SearchList.size();
 
-  for (path_iterator it = IncludePath.begin(), ie = IncludePath.end();
-   it != ie; ++it) {
-if (it->first == System || it->first == ExternCSystem ||
-(!Lang.ObjC1 && !Lang.CPlusPlus && it->first == CSystem)||
-(/*FIXME !Lang.ObjC1 && */Lang.CPlusPlus  && it->first == CXXSystem)  
||
-(Lang.ObjC1  && !Lang.CPlusPlus && it->first == ObjCSystem) ||
-(Lang.ObjC1  && Lang.CPlusPlus  && it->first == ObjCXXSystem))
-  SearchList.push_back(it->second);
-  }
-
-  for (path_iterator it = IncludePath.begin(), ie = IncludePath.end();
-   it != ie; ++it) {
-if (it->first == After)
-  SearchList.push_back(it->second);
-  }
+  for (auto &Include : IncludePath)
+if (Include.first == System || Include.first == ExternCSystem ||
+(!Lang.ObjC1 && !Lang.CPlusPlus && Include.first == CSystem) ||
+(/*FIXME !Lang.ObjC1 && */ Lang.CPlusPlus &&
+ Include.first == CXXSystem) ||
+(Lang.ObjC1 && !Lang.CPlusPlus && Include.first == ObjCSystem) ||
+(Lang.ObjC1 && Lang.CPlusPlus && Include.first == ObjCXXSystem))
+  SearchList.push_back(Include.second);
+
+  for (auto &Include : IncludePath)
+if (Include.first == After)
+  SearchList.push_back(Include.second);
 
   // Remove duplicates across both the Angled and System directories.  GCC does
   // this and failing to remove duplicates across these two groups breaks


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


Re: [PATCH] D13203: [Clang] - Massaging code to fix MSVS 2015 win32-release configuration

2015-10-01 Thread Yaron Keren via cfe-commits
yaron.keren added a subscriber: yaron.keren.
yaron.keren added a comment.

clang can't generate Visual C++ debug info except line numbers yet, so building 
with VC is essential to development on Windows. While most people and our bots 
are still using VC 2013 going forward supporting VC 2015 (even with bugs) is 
worth a small patch.


http://reviews.llvm.org/D13203



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


r249152 - constify ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember and VarTemplatePartialSpecializationDecl::getInstantiatedFromMember.

2015-10-02 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Fri Oct  2 11:40:48 2015
New Revision: 249152

URL: http://llvm.org/viewvc/llvm-project?rev=249152&view=rev
Log:
constify ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember and 
VarTemplatePartialSpecializationDecl::getInstantiatedFromMember.


Modified:
cfe/trunk/include/clang/AST/DeclTemplate.h

Modified: cfe/trunk/include/clang/AST/DeclTemplate.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclTemplate.h?rev=249152&r1=249151&r2=249152&view=diff
==
--- cfe/trunk/include/clang/AST/DeclTemplate.h (original)
+++ cfe/trunk/include/clang/AST/DeclTemplate.h Fri Oct  2 11:40:48 2015
@@ -1853,8 +1853,8 @@ public:
   /// template partial specialization \c Outer::Inner. Given
   /// \c Outer::Inner, this function would return
   /// \c Outer::Inner.
-  ClassTemplatePartialSpecializationDecl *getInstantiatedFromMember() {
-ClassTemplatePartialSpecializationDecl *First =
+  ClassTemplatePartialSpecializationDecl *getInstantiatedFromMember() const {
+const ClassTemplatePartialSpecializationDecl *First =
 cast(getFirstDecl());
 return First->InstantiatedFromMember.getPointer();
   }
@@ -2702,8 +2702,8 @@ public:
   /// variable template partial specialization \c Outer::Inner. Given
   /// \c Outer::Inner, this function would return
   /// \c Outer::Inner.
-  VarTemplatePartialSpecializationDecl *getInstantiatedFromMember() {
-VarTemplatePartialSpecializationDecl *First =
+  VarTemplatePartialSpecializationDecl *getInstantiatedFromMember() const {
+const VarTemplatePartialSpecializationDecl *First =
 cast(getFirstDecl());
 return First->InstantiatedFromMember.getPointer();
   }


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


Re: r249141 - Revert "Add support for the new mips-mti-linux toolchain."

2015-10-02 Thread Yaron Keren via cfe-commits
The regular expression should match match clang.exe on Windows.



2015-10-02 18:00 GMT+03:00 Vasileios Kalintiris via cfe-commits <
cfe-commits@lists.llvm.org>:

> Author: vkalintiris
> Date: Fri Oct  2 10:00:55 2015
> New Revision: 249141
>
> URL: http://llvm.org/viewvc/llvm-project?rev=249141&view=rev
> Log:
> Revert "Add support for the new mips-mti-linux toolchain."
>
> This reverts commit r249137 because it broke the Windows buildbots and
> a Linux buildbot for LLD.
>
> Removed:
>
> cfe/trunk/test/Driver/Inputs/mips_mti_linux/lib/clang/3.8.0/mips-r2-hard-musl/lib/linux/libclang_rt.builtins-mips.a
>
> cfe/trunk/test/Driver/Inputs/mips_mti_linux/lib/clang/3.8.0/mips-r2-hard-musl/lib/linux/
> libclang_rt.builtins-mips.so
>
> cfe/trunk/test/Driver/Inputs/mips_mti_linux/lib/clang/3.8.0/mipsel-r2-hard-musl/lib/linux/libclang_rt.builtins-mipsel.a
>
> cfe/trunk/test/Driver/Inputs/mips_mti_linux/lib/clang/3.8.0/mipsel-r2-hard-musl/lib/linux/
> libclang_rt.builtins-mipsel.so
>
> cfe/trunk/test/Driver/Inputs/mips_mti_linux/sysroot/mips-r2-hard-musl/usr/lib/crt1.o
>
> cfe/trunk/test/Driver/Inputs/mips_mti_linux/sysroot/mips-r2-hard-musl/usr/lib/crti.o
>
> cfe/trunk/test/Driver/Inputs/mips_mti_linux/sysroot/mips-r2-hard-musl/usr/lib/crtn.o
>
> cfe/trunk/test/Driver/Inputs/mips_mti_linux/sysroot/mipsel-r2-hard-musl/usr/lib/crt1.o
>
> cfe/trunk/test/Driver/Inputs/mips_mti_linux/sysroot/mipsel-r2-hard-musl/usr/lib/crti.o
>
> cfe/trunk/test/Driver/Inputs/mips_mti_linux/sysroot/mipsel-r2-hard-musl/usr/lib/crtn.o
> cfe/trunk/test/Driver/mips-mti-linux.c
> Modified:
> cfe/trunk/lib/Driver/Driver.cpp
> cfe/trunk/lib/Driver/ToolChain.cpp
> cfe/trunk/lib/Driver/ToolChains.cpp
> cfe/trunk/lib/Driver/ToolChains.h
> cfe/trunk/lib/Driver/Tools.cpp
> cfe/trunk/lib/Driver/Tools.h
>
> Modified: cfe/trunk/lib/Driver/Driver.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=249141&r1=249140&r2=249141&view=diff
>
> ==
> --- cfe/trunk/lib/Driver/Driver.cpp (original)
> +++ cfe/trunk/lib/Driver/Driver.cpp Fri Oct  2 10:00:55 2015
> @@ -2122,11 +2122,6 @@ void Driver::generatePrefixedToolNames(
>// FIXME: Needs a better variable than DefaultTargetTriple
>Names.emplace_back(DefaultTargetTriple + "-" + Tool);
>Names.emplace_back(Tool);
> -
> -  // Allow the discovery of tools prefixed with LLVM's default target
> triple.
> -  std::string LLVMDefaultTargetTriple =
> llvm::sys::getDefaultTargetTriple();
> -  if (LLVMDefaultTargetTriple != DefaultTargetTriple)
> -Names.emplace_back(LLVMDefaultTargetTriple + "-" + Tool);
>  }
>
>  static bool ScanDirForExecutable(SmallString<128> &Dir,
> @@ -,9 +2217,6 @@ const ToolChain &Driver::getToolChain(co
>  case llvm::Triple::Linux:
>if (Target.getArch() == llvm::Triple::hexagon)
>  TC = new toolchains::HexagonToolChain(*this, Target, Args);
> -  else if ((Target.getVendor() == llvm::Triple::MipsTechnologies) &&
> -   !Target.hasEnvironment())
> -TC = new toolchains::MipsLLVMToolChain(*this, Target, Args);
>else
>  TC = new toolchains::Linux(*this, Target, Args);
>break;
>
> Modified: cfe/trunk/lib/Driver/ToolChain.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChain.cpp?rev=249141&r1=249140&r2=249141&view=diff
>
> ==
> --- cfe/trunk/lib/Driver/ToolChain.cpp (original)
> +++ cfe/trunk/lib/Driver/ToolChain.cpp Fri Oct  2 10:00:55 2015
> @@ -315,6 +315,7 @@ Tool *ToolChain::SelectTool(const JobAct
>
>  std::string ToolChain::GetFilePath(const char *Name) const {
>return D.GetFilePath(Name, *this);
> +
>  }
>
>  std::string ToolChain::GetProgramPath(const char *Name) const {
>
> Modified: cfe/trunk/lib/Driver/ToolChains.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=249141&r1=249140&r2=249141&view=diff
>
> ==
> --- cfe/trunk/lib/Driver/ToolChains.cpp (original)
> +++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Oct  2 10:00:55 2015
> @@ -1301,9 +1301,8 @@ bool Generic_GCC::GCCInstallationDetecto
>"i586-linux-gnu"};
>
>static const char *const MIPSLibDirs[] = {"/lib"};
> -  static const char *const MIPSTriples[] = {"mips-linux-gnu",
> "mips-mti-linux",
> -"mips-mti-linux-gnu",
> -"mips-img-linux-gnu"};
> +  static const char *const MIPSTriples[] = {
> +  "mips-linux-gnu", "mips-mti-linux-gnu", "mips-img-linux-gnu"};
>static const char *const MIPSELLibDirs[] = {"/lib"};
>static const char *const MIPSELTriples[] = {
>"mipsel-linux-gnu", "mipsel-linux-android", "mips-img-linux-gnu"};
> @@ -1692,32 +1691,6 @@ static bool findMIPSMultilibs(const llvm
>  

r249159 - constify four getInstantiatedFromMemberTemplate() in DeclTemplate.h.

2015-10-02 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Fri Oct  2 12:38:57 2015
New Revision: 249159

URL: http://llvm.org/viewvc/llvm-project?rev=249159&view=rev
Log:
constify four getInstantiatedFromMemberTemplate() in DeclTemplate.h.


Modified:
cfe/trunk/include/clang/AST/DeclTemplate.h

Modified: cfe/trunk/include/clang/AST/DeclTemplate.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclTemplate.h?rev=249159&r1=249158&r2=249159&view=diff
==
--- cfe/trunk/include/clang/AST/DeclTemplate.h (original)
+++ cfe/trunk/include/clang/AST/DeclTemplate.h Fri Oct  2 12:38:57 2015
@@ -946,7 +946,7 @@ public:
 return const_cast(this)->getMostRecentDecl();
   }
 
-  FunctionTemplateDecl *getInstantiatedFromMemberTemplate() {
+  FunctionTemplateDecl *getInstantiatedFromMemberTemplate() const {
 return cast_or_null(
  RedeclarableTemplateDecl::getInstantiatedFromMemberTemplate());
   }
@@ -2034,7 +2034,7 @@ public:
 return const_cast(this)->getMostRecentDecl();
   }
 
-  ClassTemplateDecl *getInstantiatedFromMemberTemplate() {
+  ClassTemplateDecl *getInstantiatedFromMemberTemplate() const {
 return cast_or_null(
  RedeclarableTemplateDecl::getInstantiatedFromMemberTemplate());
   }
@@ -2264,7 +2264,7 @@ public:
this)->getPreviousDecl());
   }
 
-  TypeAliasTemplateDecl *getInstantiatedFromMemberTemplate() {
+  TypeAliasTemplateDecl *getInstantiatedFromMemberTemplate() const {
 return cast_or_null(
  RedeclarableTemplateDecl::getInstantiatedFromMemberTemplate());
   }
@@ -2867,7 +2867,7 @@ public:
 return const_cast(this)->getMostRecentDecl();
   }
 
-  VarTemplateDecl *getInstantiatedFromMemberTemplate() {
+  VarTemplateDecl *getInstantiatedFromMemberTemplate() const {
 return cast_or_null(
 RedeclarableTemplateDecl::getInstantiatedFromMemberTemplate());
   }


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


r249228 - Replace double-negated !SourceLocation.isInvalid() with SourceLocation.isValid().

2015-10-02 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sat Oct  3 00:15:57 2015
New Revision: 249228

URL: http://llvm.org/viewvc/llvm-project?rev=249228&view=rev
Log:
Replace double-negated !SourceLocation.isInvalid() with 
SourceLocation.isValid().


Modified:
cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
cfe/trunk/lib/AST/TypeLoc.cpp
cfe/trunk/lib/Analysis/ThreadSafety.cpp
cfe/trunk/lib/Basic/SanitizerBlacklist.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp
cfe/trunk/lib/Frontend/DiagnosticRenderer.cpp
cfe/trunk/lib/Frontend/Rewrite/InclusionRewriter.cpp
cfe/trunk/lib/Frontend/TextDiagnostic.cpp
cfe/trunk/lib/Sema/DeclSpec.cpp

Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=249228&r1=249227&r2=249228&view=diff
==
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Sat Oct  3 00:15:57 2015
@@ -736,7 +736,7 @@ static bool rewriteToNSEnumDecl(const En
   SourceLocation EndOfEnumDclLoc = EnumDcl->getLocEnd();
   EndOfEnumDclLoc = trans::findSemiAfterLocation(EndOfEnumDclLoc,
  NS.getASTContext(), 
/*IsDecl*/true);
-  if (!EndOfEnumDclLoc.isInvalid()) {
+  if (EndOfEnumDclLoc.isValid()) {
 SourceRange EnumDclRange(EnumDcl->getLocStart(), EndOfEnumDclLoc);
 commit.insertFromRange(TypedefDcl->getLocStart(), EnumDclRange);
   }
@@ -746,7 +746,7 @@ static bool rewriteToNSEnumDecl(const En
   SourceLocation EndTypedefDclLoc = TypedefDcl->getLocEnd();
   EndTypedefDclLoc = trans::findSemiAfterLocation(EndTypedefDclLoc,
  NS.getASTContext(), 
/*IsDecl*/true);
-  if (!EndTypedefDclLoc.isInvalid()) {
+  if (EndTypedefDclLoc.isValid()) {
 SourceRange TDRange(TypedefDcl->getLocStart(), EndTypedefDclLoc);
 commit.remove(TDRange);
   }
@@ -755,7 +755,7 @@ static bool rewriteToNSEnumDecl(const En
 
   EndOfEnumDclLoc = trans::findLocationAfterSemi(EnumDcl->getLocEnd(), 
NS.getASTContext(),
  /*IsDecl*/true);
-  if (!EndOfEnumDclLoc.isInvalid()) {
+  if (EndOfEnumDclLoc.isValid()) {
 SourceLocation BeginOfEnumDclLoc = EnumDcl->getLocStart();
 // FIXME. This assumes that enum decl; is immediately preceded by eoln.
 // It is trying to remove the enum decl. lines entirely.

Modified: cfe/trunk/lib/AST/TypeLoc.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TypeLoc.cpp?rev=249228&r1=249227&r2=249228&view=diff
==
--- cfe/trunk/lib/AST/TypeLoc.cpp (original)
+++ cfe/trunk/lib/AST/TypeLoc.cpp Sat Oct  3 00:15:57 2015
@@ -192,7 +192,7 @@ SourceLocation TypeLoc::getBeginLoc() co
   Cur = Cur.getNextTypeLoc();
   continue;
 default:
-  if (!Cur.getLocalSourceRange().getBegin().isInvalid())
+  if (Cur.getLocalSourceRange().getBegin().isValid())
 LeftMost = Cur;
   Cur = Cur.getNextTypeLoc();
   if (Cur.isNull())

Modified: cfe/trunk/lib/Analysis/ThreadSafety.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ThreadSafety.cpp?rev=249228&r1=249227&r2=249228&view=diff
==
--- cfe/trunk/lib/Analysis/ThreadSafety.cpp (original)
+++ cfe/trunk/lib/Analysis/ThreadSafety.cpp Sat Oct  3 00:15:57 2015
@@ -787,7 +787,7 @@ static void findBlockLocations(CFG *CFGr
   }
 }
 
-if (!CurrBlockInfo->ExitLoc.isInvalid()) {
+if (CurrBlockInfo->ExitLoc.isValid()) {
   // This block contains at least one statement. Find the source location
   // of the first statement in the block.
   for (CFGBlock::const_iterator BI = CurrBlock->begin(),

Modified: cfe/trunk/lib/Basic/SanitizerBlacklist.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SanitizerBlacklist.cpp?rev=249228&r1=249227&r2=249228&view=diff
==
--- cfe/trunk/lib/Basic/SanitizerBlacklist.cpp (original)
+++ cfe/trunk/lib/Basic/SanitizerBlacklist.cpp Sat Oct  3 00:15:57 2015
@@ -40,7 +40,7 @@ bool SanitizerBlacklist::isBlacklistedFi
 
 bool SanitizerBlacklist::isBlacklistedLocation(SourceLocation Loc,
StringRef Category) const {
-  return !Loc.isInvalid() &&
+  return Loc.isValid() &&
  isBlacklistedFile(SM.getFilename(SM.getFileLoc(Loc)), Category);
 }
 

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=249228&r1=249227&r2=249228&view=diff
==
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Sat Oct  3 00

[clang-tools-extra] r249235 - Replace double negation of !FileID.isInvalid() with FileID.isValid().

2015-10-03 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sat Oct  3 05:46:20 2015
New Revision: 249235

URL: http://llvm.org/viewvc/llvm-project?rev=249235&view=rev
Log:
Replace double negation of !FileID.isInvalid() with FileID.isValid().
+couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228.


Modified:

clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp
clang-tools-extra/trunk/clang-modernize/LoopConvert/LoopActions.cpp
clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertUtils.cpp

Modified: 
clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp?rev=249235&r1=249234&r2=249235&view=diff
==
--- 
clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
 (original)
+++ 
clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
 Sat Oct  3 05:46:20 2015
@@ -118,7 +118,7 @@ getRewrittenData(const std::vectorbegin(), Buffer->end());
 

Modified: clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp?rev=249235&r1=249234&r2=249235&view=diff
==
--- clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp 
(original)
+++ clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp Sat Oct  
3 05:46:20 2015
@@ -354,7 +354,7 @@ bool IncludeDirectives::hasInclude(const
 Replacement IncludeDirectives::addAngledInclude(const clang::FileEntry *File,
 llvm::StringRef Include) {
   FileID FID = Sources.translateFile(File);
-  assert(!FID.isInvalid() && "Invalid file entry given!");
+  assert(FID.isValid() && "Invalid file entry given!");
 
   if (hasInclude(File, Include))
 return Replacement();

Modified: clang-tools-extra/trunk/clang-modernize/LoopConvert/LoopActions.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/LoopConvert/LoopActions.cpp?rev=249235&r1=249234&r2=249235&view=diff
==
--- clang-tools-extra/trunk/clang-modernize/LoopConvert/LoopActions.cpp 
(original)
+++ clang-tools-extra/trunk/clang-modernize/LoopConvert/LoopActions.cpp Sat Oct 
 3 05:46:20 2015
@@ -578,7 +578,7 @@ bool ForLoopIndexUseVisitor::TraverseMem
Context->getLangOpts());
 // If something complicated is happening (i.e. the next token isn't an
 // arrow), give up on making this work.
-if (!ArrowLoc.isInvalid()) {
+if (ArrowLoc.isValid()) {
   Usages.push_back(Usage(ResultExpr, /*IsArrow=*/true,
  SourceRange(Base->getExprLoc(), ArrowLoc)));
   return true;

Modified: clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertUtils.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertUtils.cpp?rev=249235&r1=249234&r2=249235&view=diff
==
--- clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertUtils.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertUtils.cpp Sat Oct  
3 05:46:20 2015
@@ -559,7 +559,7 @@ bool ForLoopIndexUseVisitor::TraverseMem
 Context->getLangOpts());
 // If something complicated is happening (i.e. the next token isn't an
 // arrow), give up on making this work.
-if (!ArrowLoc.isInvalid()) {
+if (ArrowLoc.isValid()) {
   addUsage(Usage(ResultExpr, Usage::UK_MemberThroughArrow,
  SourceRange(Base->getExprLoc(), ArrowLoc)));
   return true;


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


r249235 - Replace double negation of !FileID.isInvalid() with FileID.isValid().

2015-10-03 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sat Oct  3 05:46:20 2015
New Revision: 249235

URL: http://llvm.org/viewvc/llvm-project?rev=249235&view=rev
Log:
Replace double negation of !FileID.isInvalid() with FileID.isValid().
+couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228.


Modified:
cfe/trunk/include/clang/Basic/SourceLocation.h
cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
cfe/trunk/lib/Basic/SourceManager.cpp
cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp
cfe/trunk/lib/Edit/EditedSource.cpp
cfe/trunk/lib/Frontend/CompilerInstance.cpp
cfe/trunk/lib/Frontend/LogDiagnosticPrinter.cpp
cfe/trunk/lib/Frontend/TextDiagnostic.cpp
cfe/trunk/lib/Index/CommentToXML.cpp
cfe/trunk/lib/Lex/PPDirectives.cpp
cfe/trunk/lib/Lex/PreprocessingRecord.cpp
cfe/trunk/lib/Lex/Preprocessor.cpp
cfe/trunk/lib/Sema/SemaExceptionSpec.cpp
cfe/trunk/lib/Sema/SemaObjCProperty.cpp
cfe/trunk/lib/Sema/SemaType.cpp
cfe/trunk/lib/Serialization/ASTReader.cpp
cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
cfe/trunk/tools/libclang/CIndex.cpp

Modified: cfe/trunk/include/clang/Basic/SourceLocation.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceLocation.h?rev=249235&r1=249234&r2=249235&view=diff
==
--- cfe/trunk/include/clang/Basic/SourceLocation.h (original)
+++ cfe/trunk/include/clang/Basic/SourceLocation.h Sat Oct  3 05:46:20 2015
@@ -43,6 +43,7 @@ class FileID {
 public:
   FileID() : ID(0) {}
 
+  bool isValid() const { return ID != 0; }
   bool isInvalid() const { return ID == 0; }
 
   bool operator==(const FileID &RHS) const { return ID == RHS.ID; }

Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=249235&r1=249234&r2=249235&view=diff
==
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Sat Oct  3 05:46:20 2015
@@ -1805,7 +1805,7 @@ private:
   FileID FID;
   unsigned Offset;
   std::tie(FID, Offset) = SourceMgr.getDecomposedLoc(Loc);
-  assert(!FID.isInvalid());
+  assert(FID.isValid());
   SmallString<200> Path =
   StringRef(SourceMgr.getFileEntryForID(FID)->getName());
   llvm::sys::fs::make_absolute(Path);
@@ -1862,8 +1862,8 @@ void ObjCMigrateASTConsumer::HandleTrans
 for (DeclContext::decl_iterator D = TU->decls_begin(), DEnd = 
TU->decls_end();
  D != DEnd; ++D) {
   FileID FID = PP.getSourceManager().getFileID((*D)->getLocation());
-  if (!FID.isInvalid())
-if (!FileId.isInvalid() && FileId != FID) {
+  if (FID.isValid())
+if (FileId.isValid() && FileId != FID) {
   if (ASTMigrateActions & FrontendOptions::ObjCMT_Annotation)
 AnnotateImplicitBridging(Ctx);
 }

Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=249235&r1=249234&r2=249235&view=diff
==
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Sat Oct  3 05:46:20 2015
@@ -1408,7 +1408,7 @@ unsigned SourceManager::getPresumedLineN
 /// considered to be from a system header.
 SrcMgr::CharacteristicKind
 SourceManager::getFileCharacteristic(SourceLocation Loc) const {
-  assert(!Loc.isInvalid() && "Can't get file characteristic of invalid loc!");
+  assert(Loc.isValid() && "Can't get file characteristic of invalid loc!");
   std::pair LocInfo = getDecomposedExpansionLoc(Loc);
   bool Invalid = false;
   const SLocEntry &SEntry = getSLocEntry(LocInfo.first, &Invalid);
@@ -1613,7 +1613,7 @@ FileID SourceManager::translateFile(cons
   // location in the main file.
   Optional SourceFileUID;
   Optional SourceFileName;
-  if (!MainFileID.isInvalid()) {
+  if (MainFileID.isValid()) {
 bool Invalid = false;
 const SLocEntry &MainSLoc = getSLocEntry(MainFileID, &Invalid);
 if (Invalid)
@@ -1786,7 +1786,7 @@ SourceLocation SourceManager::translateL
 /// 110 -> SourceLocation()
 void SourceManager::computeMacroArgsCache(MacroArgsMap *&CachePtr,
   FileID FID) const {
-  assert(!FID.isInvalid());
+  assert(FID.isValid());
   assert(!CachePtr);
 
   CachePtr = new MacroArgsMap();

Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp?rev=249235&r1=249234&r2=249235&view=diff
==
--- cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp (original)
+++ cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Sat Oct  3 05:46:20 2015
@@ -244,7 +244,7 @@ public:
   assert(Region.hasEndLoc() && "incomplete region");
 
  

Re: [PATCH] D11944: Nativize filename in FileManager::getFile().

2015-08-11 Thread Yaron Keren via cfe-commits
yaron.keren added a subscriber: yaron.keren.
yaron.keren added a comment.

There is also the case insensitivity issue, see

https://llvm.org/bugs/show_bug.cgi?id=17993


http://reviews.llvm.org/D11944



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


Re: [PATCH] D11808: Driver: Fix include and lib dirs when not using gcc under mingw

2015-08-12 Thread Yaron Keren via cfe-commits
yaron.keren added a comment.

Yes, go ahead.


http://reviews.llvm.org/D11808



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


r244869 - Disable failing check in bots from r244867.

2015-08-12 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Thu Aug 13 01:12:49 2015
New Revision: 244869

URL: http://llvm.org/viewvc/llvm-project?rev=244869&view=rev
Log:
Disable failing check in bots from r244867.


Modified:
cfe/trunk/test/Frontend/dependency-gen.c

Modified: cfe/trunk/test/Frontend/dependency-gen.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/dependency-gen.c?rev=244869&r1=244868&r2=244869&view=diff
==
--- cfe/trunk/test/Frontend/dependency-gen.c (original)
+++ cfe/trunk/test/Frontend/dependency-gen.c Thu Aug 13 01:12:49 2015
@@ -25,7 +25,6 @@
 // CHECK-SEVEN: .blacklist
 // CHECK-SEVEN: {{ }}x.h
 // RUN: %clang -MD -MF - %s -fsyntax-only -fsanitize=address -flto -I . | 
FileCheck -check-prefix=CHECK-EIGHT %s
-// CHECK-EIGHT: asan_blacklist.txt
 // CHECK-EIGHT: {{ }}x.h
 // RUN: %clang -MD -MF - %s -fsyntax-only -fsanitize=address -flto -I . 
-fno-sanitize-blacklist | FileCheck -check-prefix=CHECK-NINE %s
 // CHECK-NINE-NOT: asan_blacklist.txt


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


Re: r244867 - Add sanitizer blacklists to the rules generated with -M/-MM/-MD/-MMD.

2015-08-12 Thread Yaron Keren via cfe-commits
Hi Ivan,

CHECK-EIGHT is failing bots, see


http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/24306/steps/check-all/logs/FAIL%3A%20Clang%3A%3Adependency-gen.c

I disabled it in r244869.

Yaron


2015-08-13 7:04 GMT+03:00 Ivan Krasin via cfe-commits <
cfe-commits@lists.llvm.org>:

> Author: krasin
> Date: Wed Aug 12 23:04:37 2015
> New Revision: 244867
>
> URL: http://llvm.org/viewvc/llvm-project?rev=244867&view=rev
> Log:
> Add sanitizer blacklists to the rules generated with -M/-MM/-MD/-MMD.
>
> Summary:
> Clang sanitizers, such as AddressSanitizer, ThreadSanitizer,
> MemorySanitizer,
> Control Flow Integrity and others, use blacklists to specify which types /
> functions
> should not be instrumented to avoid false positives or suppress known
> failures.
>
> This change adds the blacklist filenames to the list of dependencies of
> the rules,
> generated with -M/-MM/-MD/-MMD. This lets CMake/Ninja recognize that
> certain
> C/C++/ObjC files need to be recompiled (if a blacklist is updated).
>
> Reviewers: pcc
>
> Subscribers: rsmith, honggyu.kim, pcc, cfe-commits
>
> Differential Revision: http://reviews.llvm.org/D11968
>
> Modified:
> cfe/trunk/include/clang/Frontend/DependencyOutputOptions.h
> cfe/trunk/include/clang/Frontend/Utils.h
> cfe/trunk/lib/Frontend/CompilerInstance.cpp
> cfe/trunk/lib/Frontend/CompilerInvocation.cpp
> cfe/trunk/lib/Frontend/DependencyFile.cpp
> cfe/trunk/lib/Frontend/HeaderIncludeGen.cpp
> cfe/trunk/test/Frontend/dependency-gen.c
> cfe/trunk/test/Frontend/print-header-includes.c
>
> Modified: cfe/trunk/include/clang/Frontend/DependencyOutputOptions.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/DependencyOutputOptions.h?rev=244867&r1=244866&r2=244867&view=diff
>
> ==
> --- cfe/trunk/include/clang/Frontend/DependencyOutputOptions.h (original)
> +++ cfe/trunk/include/clang/Frontend/DependencyOutputOptions.h Wed Aug 12
> 23:04:37 2015
> @@ -47,6 +47,9 @@ public:
>/// must contain at least one entry.
>std::vector Targets;
>
> +  /// A list of filenames to be used as extra dependencies for every
> target.
> +  std::vector ExtraDeps;
> +
>/// \brief The file to write GraphViz-formatted header dependencies to.
>std::string DOTOutputFile;
>
>
> Modified: cfe/trunk/include/clang/Frontend/Utils.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/Utils.h?rev=244867&r1=244866&r2=244867&view=diff
>
> ==
> --- cfe/trunk/include/clang/Frontend/Utils.h (original)
> +++ cfe/trunk/include/clang/Frontend/Utils.h Wed Aug 12 23:04:37 2015
> @@ -148,6 +148,9 @@ public:
>  /// AttachHeaderIncludeGen - Create a header include list generator, and
> attach
>  /// it to the given preprocessor.
>  ///
> +/// \param ExtraHeaders - If not empty, will write the header filenames,
> just
> +/// like they were included during a regular preprocessing. Useful for
> +/// implicit include dependencies, like sanitizer blacklists.
>  /// \param ShowAllHeaders - If true, show all header information instead
> of just
>  /// headers following the predefines buffer. This is useful for making
> sure
>  /// includes mentioned on the command line are also reported, but differs
> from
> @@ -156,7 +159,9 @@ public:
>  /// information to, instead of writing to stderr.
>  /// \param ShowDepth - Whether to indent to show the nesting of the
> includes.
>  /// \param MSStyle - Whether to print in cl.exe /showIncludes style.
> -void AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders = false,
> +void AttachHeaderIncludeGen(Preprocessor &PP,
> +const std::vector &ExtraHeaders,
> +bool ShowAllHeaders = false,
>  StringRef OutputPath = "",
>  bool ShowDepth = true, bool MSStyle = false);
>
>
> Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=244867&r1=244866&r2=244867&view=diff
>
> ==
> --- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
> +++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Wed Aug 12 23:04:37 2015
> @@ -354,17 +354,19 @@ void CompilerInstance::createPreprocesso
>
>// Handle generating header include information, if requested.
>if (DepOpts.ShowHeaderIncludes)
> -AttachHeaderIncludeGen(*PP);
> +AttachHeaderIncludeGen(*PP, DepOpts.ExtraDeps);
>if (!DepOpts.HeaderIncludeOutputFile.empty()) {
>  StringRef OutputPath = DepOpts.HeaderIncludeOutputFile;
>  if (OutputPath == "-")
>OutputPath = "";
> -AttachHeaderIncludeGen(*PP, /*ShowAllHeaders=*/true, OutputPath,
> +AttachHeaderIncludeGen(*PP, DepOpts.ExtraDeps,
> 

r244871 - Remove superfluous private:, TypeCache is private by default.

2015-08-13 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Thu Aug 13 02:12:03 2015
New Revision: 244871

URL: http://llvm.org/viewvc/llvm-project?rev=244871&view=rev
Log:
Remove superfluous private:, TypeCache is private by default.


Modified:
cfe/trunk/lib/CodeGen/CodeGenTypes.h

Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.h?rev=244871&r1=244870&r2=244871&view=diff
==
--- cfe/trunk/lib/CodeGen/CodeGenTypes.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.h Thu Aug 13 02:12:03 2015
@@ -158,7 +158,6 @@ class CodeGenTypes {
 
   SmallVector DeferredRecords;
   
-private:
   /// This map keeps cache of llvm::Types and maps clang::Type to
   /// corresponding llvm::Type.
   llvm::DenseMap TypeCache;


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


Re: [PATCH] D11944: Nativize filename in FileManager::getFile().

2015-08-13 Thread Yaron Keren via cfe-commits
yaron.keren added inline comments.


Comment at: lib/Basic/FileManager.cpp:221-222
@@ -220,1 +220,4 @@
 
+  SmallString<1024> NativeFilename;
+  llvm::sys::path::native(Filename, NativeFilename);
+

rsmith wrote:
> I have two concerns with this:
> 
> 1) It's needlessly inefficient on non-Win32 platforms (we'll make an 
> unnecessary string copy)
> 2) It does something bizarre and wrong on non-Win32 platforms (it converts 
> `\` to `/` unless the `\` is followed by another `\`, making most files 
> containing `\` inaccessible)
2 is surprising. Any idea why native does this on non-Windows platforms?



http://reviews.llvm.org/D11944



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


Re: [PATCH] D11944: Nativize filename in FileManager::getFile().

2015-08-13 Thread Yaron Keren via cfe-commits
yaron.keren added a comment.

I think she wishes your second option.

Note that windows API actually do accept slash as seperator and need no 
conversion.

  
https://en.wikipedia.org/wiki/Path_(computing)#MS-DOS.2FMicrosoft_Windows_style

The issues are with apps that interpret slash as switch, mainly the VC 
toolchain and with humans that may expect to see backward slashes. Not all apps 
do. Windows ports of the gnu utils accept slash just fine, so both

  ls ../test
  ls ..\test

work running from cmd.exe. So lit tests can continue to use slash unless they 
call the real VC toolchain (in which case they can't run on non-Windows anyhow).

As for the humans, while it may make sense to backward-slash paths when 
printing diagnostics, the current output is a mix of 
whatever-was-used-as-input, slashes and backslahses depending on the code path 
so any standardization - slash or backslash - would be better.

Overall, this makes sense and will simplify code and tests.


http://reviews.llvm.org/D11944



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


r244888 - Remove raw_svector_ostream::resync and users. It's no-op after r244870.

2015-08-13 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Thu Aug 13 07:42:25 2015
New Revision: 244888

URL: http://llvm.org/viewvc/llvm-project?rev=244888&view=rev
Log:
Remove raw_svector_ostream::resync and users. It's no-op after r244870.


Modified:
cfe/trunk/lib/CodeGen/TargetInfo.cpp

Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=244888&r1=244887&r2=244888&view=diff
==
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Thu Aug 13 07:42:25 2015
@@ -6780,9 +6780,7 @@ static bool extractFieldType(SmallVector
 if (Field->isBitField()) {
   Enc += "b(";
   llvm::raw_svector_ostream OS(Enc);
-  OS.resync();
   OS << Field->getBitWidthValue(CGM.getContext());
-  OS.flush();
   Enc += ':';
 }
 if (!appendType(Enc, Field->getType(), CGM, TSC))


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


Re: r244867 - Add sanitizer blacklists to the rules generated with -M/-MM/-MD/-MMD.

2015-08-13 Thread Yaron Keren via cfe-commits
There is great variety of OSs, compilers, configs in the bots. You can't
get the smae with try bots unless everything is duplicated which is a
waste. You test locally, commit, watch the bots here:

 http://lab.llvm.org:8011/grid

or wait for buildbot failure e-mails which arrive a bit slower.
Breaks may happen even if you test locally, so it's critical be around
after the commit to to resolve such issues.

 http://llvm.org/docs/DeveloperPolicy.html#quality



2015-08-13 20:51 GMT+03:00 Ivan Krasin :

> Thank you, Yaron.
>
> Sorry for breaking the build, it obviously passed locally and I didn't
> think about all the variety of the supported configs. :(
>
> Does LLVM have try bots, so that I can run the tests with my patch before
> committing it?
>
> krasin
>

On Thu, Aug 13, 2015 at 3:40 AM, Renato Golin 
wrote:

> On 13 August 2015 at 07:15, Yaron Keren via cfe-commits
>  wrote:
> > CHECK-EIGHT is failing bots, see
> >
> >
> http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/24306/steps/check-all/logs/FAIL%3A%20Clang%3A%3Adependency-gen.c
>
>
> That check only works if compiler-rt is built in, and supports the
> target. I wouldn't put that in a Clang test.
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r244928 - Remove and forbid raw_svector_ostream::flush() calls.

2015-08-13 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Thu Aug 13 13:12:56 2015
New Revision: 244928

URL: http://llvm.org/viewvc/llvm-project?rev=244928&view=rev
Log:
Remove and forbid raw_svector_ostream::flush() calls.
After r244870 flush() will only compare two null pointers and return,
doing nothing but wasting run time. The call is not required any more
as the stream and its SmallString are always in sync.

Thanks to David Blaikie for reviewing.


Modified:
cfe/trunk/lib/ARCMigrate/ARCMT.cpp
cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
cfe/trunk/lib/AST/ASTDiagnostic.cpp
cfe/trunk/lib/AST/Expr.cpp
cfe/trunk/lib/AST/ItaniumMangle.cpp
cfe/trunk/lib/AST/Mangle.cpp
cfe/trunk/lib/AST/MicrosoftMangle.cpp
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/lib/CodeGen/CGVTT.cpp
cfe/trunk/lib/CodeGen/CGVTables.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp
cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
cfe/trunk/lib/Index/CommentToXML.cpp
cfe/trunk/lib/Index/USRGeneration.cpp
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaExceptionSpec.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
cfe/trunk/tools/libclang/CIndex.cpp

Modified: cfe/trunk/lib/ARCMigrate/ARCMT.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ARCMT.cpp?rev=244928&r1=244927&r2=244928&view=diff
==
--- cfe/trunk/lib/ARCMigrate/ARCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ARCMT.cpp Thu Aug 13 13:12:56 2015
@@ -600,7 +600,6 @@ bool MigrationProcess::applyTransform(Tr
 SmallString<512> newText;
 llvm::raw_svector_ostream vecOS(newText);
 buf.write(vecOS);
-vecOS.flush();
 std::unique_ptr memBuf(
 llvm::MemoryBuffer::getMemBufferCopy(
 StringRef(newText.data(), newText.size()), newFname));

Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=244928&r1=244927&r2=244928&view=diff
==
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Thu Aug 13 13:12:56 2015
@@ -1982,7 +1982,6 @@ void ObjCMigrateASTConsumer::HandleTrans
 SmallString<512> newText;
 llvm::raw_svector_ostream vecOS(newText);
 buf.write(vecOS);
-vecOS.flush();
 std::unique_ptr memBuf(
 llvm::MemoryBuffer::getMemBufferCopy(
 StringRef(newText.data(), newText.size()), file->getName()));
@@ -2215,7 +2214,6 @@ static std::string applyEditsToTemp(cons
   SmallString<512> NewText;
   llvm::raw_svector_ostream OS(NewText);
   Buf->write(OS);
-  OS.flush();
 
   SmallString<64> TempPath;
   int FD;

Modified: cfe/trunk/lib/AST/ASTDiagnostic.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTDiagnostic.cpp?rev=244928&r1=244927&r2=244928&view=diff
==
--- cfe/trunk/lib/AST/ASTDiagnostic.cpp (original)
+++ cfe/trunk/lib/AST/ASTDiagnostic.cpp Thu Aug 13 13:12:56 2015
@@ -445,8 +445,6 @@ void clang::FormatASTNodeDiagnosticArgum
 
   }
 
-  OS.flush();
-
   if (NeedQuotes) {
 Output.insert(Output.begin()+OldEnd, '\'');
 Output.push_back('\'');

Modified: cfe/trunk/lib/AST/Expr.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=244928&r1=244927&r2=244928&view=diff
==
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Thu Aug 13 13:12:56 2015
@@ -498,7 +498,6 @@ std::string PredefinedExpr::ComputeName(
 else
   MC->mangleName(ND, Out);
 
-Out.flush();
 if (!Buffer.empty() && Buffer.front() == '\01')
   return Buffer.substr(1);
 return Buffer.str();
@@ -660,7 +659,6 @@ std::string PredefinedExpr::ComputeName(
 
 Out << Proto;
 
-Out.flush();
 return Name.str().str();
   }
   if (const CapturedDecl *CD = dyn_cast(CurrentDecl)) {
@@ -692,7 +690,6 @@ std::string PredefinedExpr::ComputeName(
 MD->getSelector().print(Out);
 Out <<  ']';
 
-Out.flush();
 return Name.str().str();
   }
   if (isa(CurrentDecl) && IT == PrettyFunction) {

Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=244928&r1=244927&r2=244928&view=diff
==
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Thu Aug 13 13:12:56 2015
@@ -2405,7 +2405,6 @@ void CXXNameMangler::mangleType(const Ob
   StringRef name = I->getName();
   Qua

r245184 - Enable passing test on Windows + MSYS.

2015-08-16 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sun Aug 16 14:02:49 2015
New Revision: 245184

URL: http://llvm.org/viewvc/llvm-project?rev=245184&view=rev
Log:
Enable passing test on Windows + MSYS.


Modified:
cfe/trunk/test/Preprocessor/macro-multiline.c

Modified: cfe/trunk/test/Preprocessor/macro-multiline.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro-multiline.c?rev=245184&r1=245183&r2=245184&view=diff
==
--- cfe/trunk/test/Preprocessor/macro-multiline.c (original)
+++ cfe/trunk/test/Preprocessor/macro-multiline.c Sun Aug 16 14:02:49 2015
@@ -1,5 +1,4 @@
 // RUN: printf -- "-DX=A\nTHIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT" | xargs -0 
%clang -E %s | FileCheck -strict-whitespace %s
-// REQUIRES: shell
 
 // Per GCC -D semantics, \n and anything that follows is ignored.
 


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


r245459 - According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.

2015-08-19 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Wed Aug 19 12:02:32 2015
New Revision: 245459

URL: http://llvm.org/viewvc/llvm-project?rev=245459&view=rev
Log:
According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.
See
 https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html


Added:
cfe/trunk/test/CodeGen/mingw-long-double-size.c
Modified:
cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=245459&r1=245458&r2=245459&view=diff
==
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Wed Aug 19 12:02:32 2015
@@ -3785,7 +3785,8 @@ class MinGWX86_32TargetInfo : public Win
 public:
   MinGWX86_32TargetInfo(const llvm::Triple &Triple)
   : WindowsX86_32TargetInfo(Triple) {
-LongDoubleWidth = LongDoubleAlign = 128;
+LongDoubleWidth = 96;
+LongDoubleAlign = 128;
 LongDoubleFormat = &llvm::APFloat::x87DoubleExtended;
   }
   void getTargetDefines(const LangOptions &Opts,

Added: cfe/trunk/test/CodeGen/mingw-long-double-size.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mingw-long-double-size.c?rev=245459&view=auto
==
--- cfe/trunk/test/CodeGen/mingw-long-double-size.c (added)
+++ cfe/trunk/test/CodeGen/mingw-long-double-size.c Wed Aug 19 12:02:32 2015
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -triple i686-pc-windows-gnu -S %s  -o - | FileCheck %s 
-check-prefix=CHECK_I686
+// CHECK_I686: lda,12
+// RUN: %clang_cc1 -triple x86_64-pc-windows-gnu -S %s  -o - | FileCheck %s 
-check-prefix=CHECK_X86_64
+// CHECK_X86_64: lda,16
+long double lda;


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


r245462 - Add REQUIRES: x86-registered-target to test since it's required.

2015-08-19 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Wed Aug 19 12:18:32 2015
New Revision: 245462

URL: http://llvm.org/viewvc/llvm-project?rev=245462&view=rev
Log:
Add REQUIRES: x86-registered-target to test since it's required.


Modified:
cfe/trunk/test/CodeGen/mingw-long-double-size.c

Modified: cfe/trunk/test/CodeGen/mingw-long-double-size.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mingw-long-double-size.c?rev=245462&r1=245461&r2=245462&view=diff
==
--- cfe/trunk/test/CodeGen/mingw-long-double-size.c (original)
+++ cfe/trunk/test/CodeGen/mingw-long-double-size.c Wed Aug 19 12:18:32 2015
@@ -1,3 +1,4 @@
+// REQUIRES: x86-registered-target
 // RUN: %clang_cc1 -triple i686-pc-windows-gnu -S %s  -o - | FileCheck %s 
-check-prefix=CHECK_I686
 // CHECK_I686: lda,12
 // RUN: %clang_cc1 -triple x86_64-pc-windows-gnu -S %s  -o - | FileCheck %s 
-check-prefix=CHECK_X86_64


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


Re: r245084 - WindowsX86: long double is x87DoubleExtended on mingw

2015-08-19 Thread Yaron Keren via cfe-commits
Sorry to notice late (just diagnosed the issue from a failing boost::math
test), according to i686 ABI, long double size on x86 is 12 bytes (the
memory allocated, not the underlying 80 bits register), see

https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html

-m128bit-long-double
Control the size of long double type. i386 application binary interface
specify the size to be 12 bytes, while modern architectures (Pentium and
newer) prefer long double aligned to 8 or 16 byte boundary. This is
impossible to reach with 12 byte long doubles in the array accesses.
Warning: if you use the -m128bit-long-double switch, the structures and
arrays containing long double will change their size as well as function
calling convention for function taking long double will be modified.

-m96bit-long-double
Set the size of long double to 96 bits as required by the i386 application
binary interface. This is the default.


You can check long double size out by running

#include 
int main() {
  long double a;
  std::cout<:

> On Tue, Aug 18, 2015 at 6:11 PM, Richard Smith 
> wrote:
> > On Tue, Aug 18, 2015 at 3:01 PM, Hans Wennborg 
> wrote:
> >>
> >> Richard, I tried to ping you on the review thread but I'm not sure it
> >> got through. Martell requested this be merged to 3.7. What do you
> >> think?
> >
> >
> > LGTM
>
> Thanks! r245456.
>
> >
> >>
> >> On Fri, Aug 14, 2015 at 12:05 PM, Martell Malone via cfe-commits
> >>  wrote:
> >> > Author: martell
> >> > Date: Fri Aug 14 14:05:56 2015
> >> > New Revision: 245084
> >> >
> >> > URL: http://llvm.org/viewvc/llvm-project?rev=245084&view=rev
> >> > Log:
> >> > WindowsX86: long double is x87DoubleExtended on mingw
> >> >
> >> > Summary:
> >> > long double on x86 mingw is 80bits and is aligned to 16bytes
> >> >
> >> > Fixes:
> >> > https://llvm.org/bugs/show_bug.cgi?id=24398
> >> >
> >> > Reviewers: rnk
> >> >
> >> > Subscribers: cfe-commits
> >> >
> >> > Differential Revision: http://reviews.llvm.org/D12037
> >> >
> >> > Modified:
> >> > cfe/trunk/lib/Basic/Targets.cpp
> >> >
> >> > Modified: cfe/trunk/lib/Basic/Targets.cpp
> >> > URL:
> >> >
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=245084&r1=245083&r2=245084&view=diff
> >> >
> >> >
> ==
> >> > --- cfe/trunk/lib/Basic/Targets.cpp (original)
> >> > +++ cfe/trunk/lib/Basic/Targets.cpp Fri Aug 14 14:05:56 2015
> >> > @@ -3784,7 +3784,10 @@ namespace {
> >> >  class MinGWX86_32TargetInfo : public WindowsX86_32TargetInfo {
> >> >  public:
> >> >MinGWX86_32TargetInfo(const llvm::Triple &Triple)
> >> > -  : WindowsX86_32TargetInfo(Triple) {}
> >> > +  : WindowsX86_32TargetInfo(Triple) {
> >> > +LongDoubleWidth = LongDoubleAlign = 128;
> >> > +LongDoubleFormat = &llvm::APFloat::x87DoubleExtended;
> >> > +  }
> >> >void getTargetDefines(const LangOptions &Opts,
> >> >  MacroBuilder &Builder) const override {
> >> >  WindowsX86_32TargetInfo::getTargetDefines(Opts, Builder);
> >> > @@ -4014,7 +4017,10 @@ public:
> >> >  class MinGWX86_64TargetInfo : public WindowsX86_64TargetInfo {
> >> >  public:
> >> >MinGWX86_64TargetInfo(const llvm::Triple &Triple)
> >> > -  : WindowsX86_64TargetInfo(Triple) {}
> >> > +  : WindowsX86_64TargetInfo(Triple) {
> >> > +LongDoubleWidth = LongDoubleAlign = 128;
> >> > +LongDoubleFormat = &llvm::APFloat::x87DoubleExtended;
> >> > +  }
> >> >void getTargetDefines(const LangOptions &Opts,
> >> >  MacroBuilder &Builder) const override {
> >> >  WindowsX86_64TargetInfo::getTargetDefines(Opts, Builder);
> >> >
> >> >
> >> > ___
> >> > cfe-commits mailing list
> >> > cfe-commits@lists.llvm.org
> >> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
> >
> >
> ___
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r245459 - According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.

2015-08-19 Thread Yaron Keren via cfe-commits
Yes, it looks like a legacy issue. Documentation says so:

*https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/i386-and-x86-64-Options.html
<https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/i386-and-x86-64-Options.html>*

-m96bit-long-double-m128bit-long-doubleThese switches control the size of long
double type. The i386 application binary interface specifies the size to be
96 bits, so -m96bit-long-double is the default in 32-bit mode.

Modern architectures (Pentium and newer) prefer long double to be aligned
to an 8- or 16-byte boundary. In arrays or structures conforming to the
ABI, this is not possible. So specifying -m128bit-long-double aligns long
double to a 16-byte boundary by padding the long double with an additional
32-bit zero.

In the x86-64 compiler, -m128bit-long-double is the default choice as its
ABI specifies that long double is aligned on 16-byte boundary.

Notice that neither of these options enable any extra precision over the
x87 standard of 80 bits for a long double.

*Warning:* if you override the default value for your target ABI, this
changes the size of structures and arrays containing long double variables,
as well as modifying the function calling convention for functions taking long
double. Hence they are not binary-compatible with code compiled without
that switch.

And practical testing agrees:

sh-4.3$ cat < a.cpp
#include 
int main() {
  long double a;
  std::cout<http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe
-I/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32/opt/include
-I/c/mingw510/prerequisites/i686-zlib-static/include
-I/c/mingw510/prerequisites/i686-w64-mingw32-static/include' CXXFLAGS='-O2
-pipe -I/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32/opt/include
-I/c/mingw510/prerequisites/i686-zlib-static/include
-I/c/mingw510/prerequisites/i686-w64-mingw32-static/include' CPPFLAGS=
LDFLAGS='-pipe
-L/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32/opt/lib
-L/c/mingw510/prerequisites/i686-zlib-static/lib
-L/c/mingw510/prerequisites/i686-w64-mingw32-static/lib
-Wl,--large-address-aware'
Thread model: posix
gcc version 5.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)

sh-4.3$ g++ a.cpp
sh-4.3$ ./a.exe
12

Without the patch clang outputs 16 and seg faults on a boost::math example.


2015-08-19 21:29 GMT+03:00 Richard Smith :

> On Wed, Aug 19, 2015 at 10:02 AM, Yaron Keren via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
>> Author: yrnkrn
>> Date: Wed Aug 19 12:02:32 2015
>> New Revision: 245459
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=245459&view=rev
>> Log:
>> According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.
>> See
>>  https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html
>>
>>
>> Added:
>> cfe/trunk/test/CodeGen/mingw-long-double-size.c
>> Modified:
>> cfe/trunk/lib/Basic/Targets.cpp
>>
>> Modified: cfe/trunk/lib/Basic/Targets.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=245459&r1=245458&r2=245459&view=diff
>>
>> ==
>> --- cfe/trunk/lib/Basic/Targets.cpp (original)
>> +++ cfe/trunk/lib/Basic/Targets.cpp Wed Aug 19 12:02:32 2015
>> @@ -3785,7 +3785,8 @@ class MinGWX86_32TargetInfo : public Win
>>  public:
>>MinGWX86_32TargetInfo(const llvm::Triple &Triple)
>>: WindowsX86_32TargetInfo(Triple) {
>> -LongDoubleWidth = LongDoubleAlign = 128;
>> +LongDoubleWidth = 96;
>> +LongDoubleAlign = 128;
>>
>
> Is this really correct? It's deeply suspicious that the size is not a
> multiple of the alignment.
>
>
>>  LongDoubleFormat = &llvm::APFloat::x87DoubleExtended;
>>}
>>void getTargetDefines(const LangOptions &Opts,
>>
>> Added: cfe/trunk/test/CodeGen/mingw-long-double-size.c
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mingw-long-double-size.c?rev=245459&view=auto
>>
>> ==
>> --- cfe/trunk/test/CodeGen/mingw-long-double-size.c (added)
>> +++ cfe/trunk/test/CodeGen/mingw-long-double-size.c Wed Aug 19 12:02:32
>> 2015
>> @@ -0,0 +1,5 @@
>> +// RUN: %clang_cc1 -triple i686-pc-windows-gnu -S %s  -o - | FileCheck
>> %s -check-prefix=CHECK_I686
>> +// CHECK_I686: lda,12
>> +// RUN: %clang_cc1 -triple x86_64-pc-windows-gnu -S %s  -o - | FileCheck
>> %s -check-prefix=CHECK_X86_64
>> +// CHECK_X86_64: lda,16
>> +long double lda;
>>
>>
>> ___
>> cfe-commits mailing list
>> cfe-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r245084 - WindowsX86: long double is x87DoubleExtended on mingw

2015-08-19 Thread Yaron Keren via cfe-commits
Yes, worth merging with Richard approval.

2015-08-19 23:16 GMT+03:00 Hans Wennborg :

> I assume this is a merge request?
>
> Richard: what do you think about r245459+r245462?
>
>
>
> On Wed, Aug 19, 2015 at 10:22 AM, Yaron Keren 
> wrote:
> > Sorry to notice late (just diagnosed the issue from a failing boost::math
> > test), according to i686 ABI, long double size on x86 is 12 bytes (the
> > memory allocated, not the underlying 80 bits register), see
> >
> > https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html
> >
> > -m128bit-long-double
> > Control the size of long double type. i386 application binary interface
> > specify the size to be 12 bytes, while modern architectures (Pentium and
> > newer) prefer long double aligned to 8 or 16 byte boundary. This is
> > impossible to reach with 12 byte long doubles in the array accesses.
> > Warning: if you use the -m128bit-long-double switch, the structures and
> > arrays containing long double will change their size as well as function
> > calling convention for function taking long double will be modified.
> >
> > -m96bit-long-double
> > Set the size of long double to 96 bits as required by the i386
> application
> > binary interface. This is the default.
> >
> >
> > You can check long double size out by running
> >
> > #include 
> > int main() {
> >   long double a;
> >   std::cout< > }
> >
> > which outputs 12 with mingw 32 bit, 16 with mingw 64 bit but always 16
> with
> > current clang.
> > I fixed this and added test in r245459+r245462.
> >
> >
> > 2015-08-19 19:41 GMT+03:00 Hans Wennborg via cfe-commits
> > :
> >>
> >> On Tue, Aug 18, 2015 at 6:11 PM, Richard Smith 
> >> wrote:
> >> > On Tue, Aug 18, 2015 at 3:01 PM, Hans Wennborg 
> >> > wrote:
> >> >>
> >> >> Richard, I tried to ping you on the review thread but I'm not sure it
> >> >> got through. Martell requested this be merged to 3.7. What do you
> >> >> think?
> >> >
> >> >
> >> > LGTM
> >>
> >> Thanks! r245456.
> >>
> >> >
> >> >>
> >> >> On Fri, Aug 14, 2015 at 12:05 PM, Martell Malone via cfe-commits
> >> >>  wrote:
> >> >> > Author: martell
> >> >> > Date: Fri Aug 14 14:05:56 2015
> >> >> > New Revision: 245084
> >> >> >
> >> >> > URL: http://llvm.org/viewvc/llvm-project?rev=245084&view=rev
> >> >> > Log:
> >> >> > WindowsX86: long double is x87DoubleExtended on mingw
> >> >> >
> >> >> > Summary:
> >> >> > long double on x86 mingw is 80bits and is aligned to 16bytes
> >> >> >
> >> >> > Fixes:
> >> >> > https://llvm.org/bugs/show_bug.cgi?id=24398
> >> >> >
> >> >> > Reviewers: rnk
> >> >> >
> >> >> > Subscribers: cfe-commits
> >> >> >
> >> >> > Differential Revision: http://reviews.llvm.org/D12037
> >> >> >
> >> >> > Modified:
> >> >> > cfe/trunk/lib/Basic/Targets.cpp
> >> >> >
> >> >> > Modified: cfe/trunk/lib/Basic/Targets.cpp
> >> >> > URL:
> >> >> >
> >> >> >
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=245084&r1=245083&r2=245084&view=diff
> >> >> >
> >> >> >
> >> >> >
> ==
> >> >> > --- cfe/trunk/lib/Basic/Targets.cpp (original)
> >> >> > +++ cfe/trunk/lib/Basic/Targets.cpp Fri Aug 14 14:05:56 2015
> >> >> > @@ -3784,7 +3784,10 @@ namespace {
> >> >> >  class MinGWX86_32TargetInfo : public WindowsX86_32TargetInfo {
> >> >> >  public:
> >> >> >MinGWX86_32TargetInfo(const llvm::Triple &Triple)
> >> >> > -  : WindowsX86_32TargetInfo(Triple) {}
> >> >> > +  : WindowsX86_32TargetInfo(Triple) {
> >> >> > +LongDoubleWidth = LongDoubleAlign = 128;
> >> >> > +LongDoubleFormat = &llvm::APFloat::x87DoubleExtended;
> >> >> > +  }
> >> >> >

r245607 - Fix test on Windows to accept both gcc and gcc.exe.

2015-08-20 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Thu Aug 20 15:37:58 2015
New Revision: 245607

URL: http://llvm.org/viewvc/llvm-project?rev=245607&view=rev
Log:
Fix test on Windows to accept both gcc and gcc.exe.


Modified:
cfe/trunk/test/Driver/biarch.c

Modified: cfe/trunk/test/Driver/biarch.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/biarch.c?rev=245607&r1=245606&r2=245607&view=diff
==
--- cfe/trunk/test/Driver/biarch.c (original)
+++ cfe/trunk/test/Driver/biarch.c Thu Aug 20 15:37:58 2015
@@ -29,7 +29,7 @@
 // RUN: grep '"-cc1" "-triple" "sparcv9--netbsd"' %t
 
 // RUN: %clang -target sparcel -o foo %s -### 2> %t
-// RUN: grep 'gcc" "-EL" "-o" "foo"' %t
+// RUN: grep 'gcc\(\.exe\)\?" "-EL" "-o" "foo"' %t
 
 // RUN: %clang -target mips64--netbsd -m32 %s -### 2> %t
 // RUN: grep '"-cc1" "-triple" "mips--netbsd"' %t


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


Re: r245459 - According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.

2015-08-20 Thread Yaron Keren via cfe-commits
OK, based on testing, mingw i686 aligns long doubles to 4 bytes:

sh-4.3$ cat < a.cpp
#include 
int main() {
  struct {
char c[1];
long double d;
  } s;
  std::cout<<&s.c<:

> On Wed, Aug 19, 2015 at 11:42 AM, Yaron Keren 
> wrote:
>
>> Yes, it looks like a legacy issue. Documentation says so:
>>
>> *https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/i386-and-x86-64-Options.html
>> <https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/i386-and-x86-64-Options.html>*
>>
>> -m96bit-long-double-m128bit-long-doubleThese switches control the size
>> of long double type. The i386 application binary interface specifies the
>> size to be 96 bits, so -m96bit-long-double is the default in 32-bit mode.
>>
>> Modern architectures (Pentium and newer) prefer long double to be
>> aligned to an 8- or 16-byte boundary. In arrays or structures conforming to
>> the ABI, this is not possible. So specifying -m128bit-long-double aligns long
>> double to a 16-byte boundary by padding the long double with an
>> additional 32-bit zero.
>>
>> In the x86-64 compiler, -m128bit-long-double is the default choice as
>> its ABI specifies that long double is aligned on 16-byte boundary.
>>
>> Notice that neither of these options enable any extra precision over the
>> x87 standard of 80 bits for a long double.
>>
>> *Warning:* if you override the default value for your target ABI, this
>> changes the size of structures and arrays containing long double variables,
>> as well as modifying the function calling convention for functions taking 
>> long
>> double. Hence they are not binary-compatible with code compiled without
>> that switch.
>>
>> And practical testing agrees:
>>
>> sh-4.3$ cat < a.cpp
>> #include 
>> int main() {
>>   long double a;
>>   std::cout<> }
>> sh-4.3$ g++ -v
>> Using built-in specs.
>> COLLECT_GCC=C:\mingw32\bin\g++.exe
>>
>> COLLECT_LTO_WRAPPER=C:/mingw32/bin/../libexec/gcc/i686-w64-mingw32/5.1.0/lto-wrapper.exe
>> Target: i686-w64-mingw32
>> Configured with: ../../../src/gcc-5.1.0/configure --host=i686-w64-mingw32
>> --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32
>> --with-sysroot=/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32
>> --with-gxx-include-dir=/mingw32/i686-w64-mingw32/include/c++
>> --enable-shared --enable-static --disable-multilib
>> --enable-languages=c,c++,fortran,objc,obj-c++,lto
>> --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp
>> --enable-libatomic --enable-lto --enable-graphite --enable-checking=release
>> --enable-fully-dynamic-string --enable-version-specific-runtime-libs
>> --disable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check
>> --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap
>> --disable-rpath --disable-win32-registry --disable-nls --disable-werror
>> --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686
>> --with-tune=generic --with-libiconv --with-system-zlib
>> --with-gmp=/c/mingw510/prerequisites/i686-w64-mingw32-static
>> --with-mpfr=/c/mingw510/prerequisites/i686-w64-mingw32-static
>> --with-mpc=/c/mingw510/prerequisites/i686-w64-mingw32-static
>> --with-isl=/c/mingw510/prerequisites/i686-w64-mingw32-static
>> --with-pkgversion='i686-posix-dwarf-rev0, Built by MinGW-W64 project'
>> --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2
>> -pipe -I/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32/opt/include
>> -I/c/mingw510/prerequisites/i686-zlib-static/include
>> -I/c/mingw510/prerequisites/i686-w64-mingw32-static/include' CXXFLAGS='-O2
>> -pipe -I/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32/opt/include
>> -I/c/mingw510/prerequisites/i686-zlib-static/include
>> -I/c/mingw510/prerequisites/i686-w64-mingw32-static/include' CPPFLAGS=
>> LDFLAGS='-pipe
>> -L/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32/opt/lib
>> -L/c/mingw510/prerequisites/i686-zlib-static/lib
>> -L/c/mingw510/prerequisites/i686-w64-mingw32-static/lib
>> -Wl,--large-address-aware'
>> Thread model: posix
>> gcc version 5.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)
>>
>> sh-4.3$ g++ a.cpp
>> sh-4.3$ ./a.exe
>> 12
>>
>> Without the patch clang outputs 16 and seg faults on a boost::math
>> example.
>>
>
> None of that answers my question. Our default GCC-compatible behavior for
> x86_32 long double is to give it 4-byte alignment, 12-byte size, and this
> matches the behavior I observe with GCC. Does MinGW /really/ deviate 

r245618 - Revert the 32bit part of r245084; mingw values were correct before it.

2015-08-20 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Thu Aug 20 16:36:14 2015
New Revision: 245618

URL: http://llvm.org/viewvc/llvm-project?rev=245618&view=rev
Log:
Revert the 32bit part of r245084; mingw values were correct before it.


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

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=245618&r1=245617&r2=245618&view=diff
==
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Aug 20 16:36:14 2015
@@ -3784,11 +3784,7 @@ namespace {
 class MinGWX86_32TargetInfo : public WindowsX86_32TargetInfo {
 public:
   MinGWX86_32TargetInfo(const llvm::Triple &Triple)
-  : WindowsX86_32TargetInfo(Triple) {
-LongDoubleWidth = 96;
-LongDoubleAlign = 128;
-LongDoubleFormat = &llvm::APFloat::x87DoubleExtended;
-  }
+  : WindowsX86_32TargetInfo(Triple) {}
   void getTargetDefines(const LangOptions &Opts,
 MacroBuilder &Builder) const override {
 WindowsX86_32TargetInfo::getTargetDefines(Opts, Builder);


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


r245620 - Revert the 64bit part of r245084; long double values were not changed by

2015-08-20 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Thu Aug 20 16:51:46 2015
New Revision: 245620

URL: http://llvm.org/viewvc/llvm-project?rev=245620&view=rev
Log:
 Revert the 64bit part of r245084; long double values were not changed by
 it as they are already set correctly by X86_64TargetInfo and X86TargetInfo.


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

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=245620&r1=245619&r2=245620&view=diff
==
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Aug 20 16:51:46 2015
@@ -4014,10 +4014,7 @@ public:
 class MinGWX86_64TargetInfo : public WindowsX86_64TargetInfo {
 public:
   MinGWX86_64TargetInfo(const llvm::Triple &Triple)
-  : WindowsX86_64TargetInfo(Triple) {
-LongDoubleWidth = LongDoubleAlign = 128;
-LongDoubleFormat = &llvm::APFloat::x87DoubleExtended;
-  }
+  : WindowsX86_64TargetInfo(Triple) {}
   void getTargetDefines(const LangOptions &Opts,
 MacroBuilder &Builder) const override {
 WindowsX86_64TargetInfo::getTargetDefines(Opts, Builder);


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


Re: r245459 - According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.

2015-08-20 Thread Yaron Keren via cfe-commits
Hi, I've just done this exactly this in r245618 (32 bit) and r245620 (64
bits).

mingw i686 long double values were correct before r245084 and wrong after
 it.
mingw x86_64 long double values were not modified at all by r245084 for the
reason you stated, so I agree and do not see how this non-change can solve
anything. There is no testcase for PR24398 nor the OP reporting the problem
was actually solved. Martell?

About PR24398,  long double support was in clang long ago and both code
examples compile and run correctly with current svn (without r245084) and gcc
version 5.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project).
It's not x86_64 but as said r245084 didn't actually modify x86_64
configuration.




2015-08-21 0:52 GMT+03:00 Richard Smith :

> OK, so here's the problem:
>
> The right way to fix this seems to be to delete the assignments to
> LongDouble* from the MinGWX86_32TargetInfo constructor; the
> X86_32TargetInfo and X86TargetInfo base classes already set them to the
> right values. Likewise we can delete the assignments to LongDouble* from
> the MinGWX86_64TargetInfo constructor for the same reason.
>
> But... that completely reverts Martell's r245084, which apparently fixed
> PR24398. So you two need to figure out what the actual problem is here, and
> what the right fix is. r245084 didn't provide any test cases, and had no
> apparent effect other than to break long double for mingw32; did it really
> fix PR24398 (and if so, how)?
>
>
> On Thu, Aug 20, 2015 at 2:27 PM, Yaron Keren 
> wrote:
>
>> OK, based on testing, mingw i686 aligns long doubles to 4 bytes:
>>
>> sh-4.3$ cat < a.cpp
>> #include 
>> int main() {
>>   struct {
>> char c[1];
>> long double d;
>>   } s;
>>   std::cout<<&s.c<>   std::cout<<&s.d<> }
>> sh-4.3$ g++ a.cpp&&./a.exe
>> 0x28fea0
>> 0x28fea4
>>
>> I'll fix that.
>>
>>
>> 2015-08-21 0:13 GMT+03:00 Richard Smith :
>>
>>> On Wed, Aug 19, 2015 at 11:42 AM, Yaron Keren 
>>> wrote:
>>>
>>>> Yes, it looks like a legacy issue. Documentation says so:
>>>>
>>>> *https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/i386-and-x86-64-Options.html
>>>> <https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/i386-and-x86-64-Options.html>*
>>>>
>>>> -m96bit-long-double-m128bit-long-doubleThese switches control the size
>>>> of long double type. The i386 application binary interface specifies
>>>> the size to be 96 bits, so -m96bit-long-double is the default in
>>>> 32-bit mode.
>>>>
>>>> Modern architectures (Pentium and newer) prefer long double to be
>>>> aligned to an 8- or 16-byte boundary. In arrays or structures conforming to
>>>> the ABI, this is not possible. So specifying -m128bit-long-double
>>>>  aligns long double to a 16-byte boundary by padding the long double with
>>>> an additional 32-bit zero.
>>>>
>>>> In the x86-64 compiler, -m128bit-long-double is the default choice as
>>>> its ABI specifies that long double is aligned on 16-byte boundary.
>>>>
>>>> Notice that neither of these options enable any extra precision over
>>>> the x87 standard of 80 bits for a long double.
>>>>
>>>> *Warning:* if you override the default value for your target ABI, this
>>>> changes the size of structures and arrays containing long double variables,
>>>> as well as modifying the function calling convention for functions taking 
>>>> long
>>>> double. Hence they are not binary-compatible with code compiled
>>>> without that switch.
>>>>
>>>> And practical testing agrees:
>>>>
>>>> sh-4.3$ cat < a.cpp
>>>> #include 
>>>> int main() {
>>>>   long double a;
>>>>   std::cout<>>> }
>>>> sh-4.3$ g++ -v
>>>> Using built-in specs.
>>>> COLLECT_GCC=C:\mingw32\bin\g++.exe
>>>>
>>>> COLLECT_LTO_WRAPPER=C:/mingw32/bin/../libexec/gcc/i686-w64-mingw32/5.1.0/lto-wrapper.exe
>>>> Target: i686-w64-mingw32
>>>> Configured with: ../../../src/gcc-5.1.0/configure
>>>> --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32
>>>> --prefix=/mingw32
>>>> --with-sysroot=/c/mingw510/i686-510-posix-dwarf-rt_v4-rev0/mingw32
>>>> --with-gxx-include-dir=/mingw32/i686-w64-mingw32/include/c++
>>>> --enable-shared --enable-static --disable-multilib
>&

Re: r245459 - According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.

2015-08-21 Thread Yaron Keren via cfe-commits
The testcase from r245459 was not reverted and still in SVN.


2015-08-21 2:05 GMT+03:00 Martell Malone :

> I feel very silly now.
> After testing the testcase again on svn it still works.
> It appears the OP was looking for this patch to go onto the 3.6 branch and
> was applying my patch to that.
>
> I'll know in future to recheck the testcase afterwards myself in future.
>
> Apologies for the noise guys.
>
> Yaron I think the test case from r245459 would be useful to ensure it is
> never broken in the future?
> Would you be able to recommit the test case?
>
> Kind Regards
> Martell
>
>
On Thu, Aug 20, 2015 at 3:57 PM, Martell Malone 
wrote:

> There is no testcase for PR24398 nor the OP reporting the problem was
>> actually solved. Martell?
>
> I'm just re-looking through it now.
>
> X86TargetInfo sets LongDoubleFormat = &llvm::APFloat::x87DoubleExtended;
> X86_64TargetInfo then sets LongDoubleWidth = LongDoubleAlign = 128;
> X86_32TargetInfo then sets LongDoubleWidth = 96; LongDoubleAlign = 32;
>
> From this I can see that the patch I committed actually doesn't change
> anything but only breaks mingw x86.
> I can only see these values changed in Microsoft*TargetInfo classes which
> is not a parent of MINGW
>
> When I submitted the patch I just wanted to explicitly set the values in 
> MinGWX86_64TargetInfo
> to ensure it was in fact that.
> It seemed as though it was not inheriting the value from the root parent
> class somehow.
>
> I was told on irc that it did fix the bug which is even stranger.
> I'm actually at a bit of a loss as to what the proper fix to this is then.
>
> Apologies for breaking mingw i686 long double.
>
> I will do up a test case and try to find the actual cause of the long
> double bug and reopen the issue.
>
> On Thu, Aug 20, 2015 at 3:09 PM, Yaron Keren 
> wrote:
>
>> Hi, I've just done this exactly this in r245618 (32 bit) and r245620 (64
>> bits).
>>
>> mingw i686 long double values were correct before r245084 and wrong after
>>  it.
>> mingw x86_64 long double values were not modified at all by r245084 for
>> the reason you stated, so I agree and do not see how this non-change can
>> solve anything. There is no testcase for PR24398 nor the OP reporting
>> the problem was actually solved. Martell?
>>
>> About PR24398,  long double support was in clang long ago and both code
>> examples compile and run correctly with current svn (without r245084)
>> and gcc version 5.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64
>> project).
>> It's not x86_64 but as said r245084 didn't actually modify x86_64
>> configuration.
>>
>>
>>
>>
>> 2015-08-21 0:52 GMT+03:00 Richard Smith :
>>
>>> OK, so here's the problem:
>>>
>>> The right way to fix this seems to be to delete the assignments to
>>> LongDouble* from the MinGWX86_32TargetInfo constructor; the
>>> X86_32TargetInfo and X86TargetInfo base classes already set them to the
>>> right values. Likewise we can delete the assignments to LongDouble* from
>>> the MinGWX86_64TargetInfo constructor for the same reason.
>>>
>>> But... that completely reverts Martell's r245084, which apparently fixed
>>> PR24398. So you two need to figure out what the actual problem is here, and
>>> what the right fix is. r245084 didn't provide any test cases, and had no
>>> apparent effect other than to break long double for mingw32; did it really
>>> fix PR24398 (and if so, how)?
>>>
>>>
>>> On Thu, Aug 20, 2015 at 2:27 PM, Yaron Keren 
>>> wrote:
>>>
>>>> OK, based on testing, mingw i686 aligns long doubles to 4 bytes:
>>>>
>>>> sh-4.3$ cat < a.cpp
>>>> #include 
>>>> int main() {
>>>>   struct {
>>>> char c[1];
>>>> long double d;
>>>>   } s;
>>>>   std::cout<<&s.c<>>>   std::cout<<&s.d<>>> }
>>>> sh-4.3$ g++ a.cpp&&./a.exe
>>>> 0x28fea0
>>>> 0x28fea4
>>>>
>>>> I'll fix that.
>>>>
>>>>
>>>> 2015-08-21 0:13 GMT+03:00 Richard Smith :
>>>>
>>>>> On Wed, Aug 19, 2015 at 11:42 AM, Yaron Keren 
>>>>> wrote:
>>>>>
>>>>>> Yes, it looks like a legacy issue. Documentation says so:
>>>>>>
>>>>>> *https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/i386-and-x86-64-Options.html
>>>>>> <

r245679 - Expand mingw-long-double.c to test for long double alignment.

2015-08-21 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Fri Aug 21 03:26:31 2015
New Revision: 245679

URL: http://llvm.org/viewvc/llvm-project?rev=245679&view=rev
Log:
Expand mingw-long-double.c to test for long double alignment.


Added:
cfe/trunk/test/CodeGen/mingw-long-double.c
Removed:
cfe/trunk/test/CodeGen/mingw-long-double-size.c

Removed: cfe/trunk/test/CodeGen/mingw-long-double-size.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mingw-long-double-size.c?rev=245678&view=auto
==
--- cfe/trunk/test/CodeGen/mingw-long-double-size.c (original)
+++ cfe/trunk/test/CodeGen/mingw-long-double-size.c (removed)
@@ -1,6 +0,0 @@
-// REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -triple i686-pc-windows-gnu -S %s  -o - | FileCheck %s 
-check-prefix=CHECK_I686
-// CHECK_I686: lda,12
-// RUN: %clang_cc1 -triple x86_64-pc-windows-gnu -S %s  -o - | FileCheck %s 
-check-prefix=CHECK_X86_64
-// CHECK_X86_64: lda,16
-long double lda;

Added: cfe/trunk/test/CodeGen/mingw-long-double.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mingw-long-double.c?rev=245679&view=auto
==
--- cfe/trunk/test/CodeGen/mingw-long-double.c (added)
+++ cfe/trunk/test/CodeGen/mingw-long-double.c Fri Aug 21 03:26:31 2015
@@ -0,0 +1,12 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 -triple i686-pc-windows-gnu -S %s  -o - | FileCheck %s 
-check-prefix=CHECK_I686
+// CHECK_I686: _lda,12
+// CHECK_I686: _lds,16
+// RUN: %clang_cc1 -triple x86_64-pc-windows-gnu -S %s  -o - | FileCheck %s 
-check-prefix=CHECK_X86_64
+// CHECK_X86_64: lda,16
+// CHECK_X86_64: lds,32
+long double lda;
+struct {
+  char c;
+  long double ldb;
+} lds;


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


[clang-tools-extra] r245683 - Tweak clang-tidy-diff.py to recognize "filename" in the diff ourput.

2015-08-21 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Fri Aug 21 04:27:24 2015
New Revision: 245683

URL: http://llvm.org/viewvc/llvm-project?rev=245683&view=rev
Log:
Tweak clang-tidy-diff.py to recognize "filename" in the diff ourput.


Modified:
clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py

Modified: clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py?rev=245683&r1=245682&r2=245683&view=diff
==
--- clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py (original)
+++ clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py Fri Aug 21 
04:27:24 2015
@@ -67,7 +67,7 @@ def main():
   filename = None
   lines_by_file = {}
   for line in sys.stdin:
-match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
+match = re.search('^\+\+\+\ \"?(.*?/){%s}([^ \t\"]*)' % args.p, line)
 if match:
   filename = match.group(2)
 if filename == None:


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


[clang-tools-extra] r245688 - Make test EOL tolerant by moving the symbol ot the first line

2015-08-21 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Fri Aug 21 05:46:46 2015
New Revision: 245688

URL: http://llvm.org/viewvc/llvm-project?rev=245688&view=rev
Log:
Make test EOL tolerant by moving the symbol ot the first line
before any EOL changes the byte offset count and enable it on Windows.


Modified:
clang-tools-extra/trunk/test/clang-rename/VarTest.cpp

Modified: clang-tools-extra/trunk/test/clang-rename/VarTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-rename/VarTest.cpp?rev=245688&r1=245687&r2=245688&view=diff
==
--- clang-tools-extra/trunk/test/clang-rename/VarTest.cpp (original)
+++ clang-tools-extra/trunk/test/clang-rename/VarTest.cpp Fri Aug 21 05:46:46 
2015
@@ -1,10 +1,8 @@
+namespace A { int foo;  // CHECK: int hector;
+}
 // RUN: cat %s > %t.cpp
-// RUN: clang-rename -offset=170 -new-name=hector %t.cpp -i --
+// RUN: clang-rename -offset=18 -new-name=hector %t.cpp -i --
 // RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
-// REQUIRES: shell
-namespace A {
-int foo;  // CHECK: int hector;
-}
 int foo;  // CHECK: int foo;
 int bar = foo; // CHECK: bar = foo;
 int baz = A::foo; // CHECK: baz = A::hector;


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


Re: [clang-tools-extra] r245683 - Tweak clang-tidy-diff.py to recognize "filename" in the diff ourput.

2015-08-21 Thread Yaron Keren via cfe-commits
Whenever is any special character in the filename, such as space or
backslash (Windows), some examples:

On Windows:
--- ".\\a.cpp"  2015-08-21 00:22:57.885370200 +0300
+++ b.cpp   2015-08-21 01:05:28.726269900 +0300

--- ./a.cpp 2015-08-21 00:22:57.885370200 +0300
+++ b.cpp   2015-08-21 01:05:28.726269900 +0300

--- "a a.cpp"   2015-08-21 00:22:57.885370200 +0300
+++ b.cpp   2015-08-21 01:05:28.726269900 +0300

On Linux:
~$ diff -U0 ./a.cpp b\ b.cpp
--- ./a.cpp 2015-08-14 00:27:03.569276652 +0300
+++ "b b.cpp"   2015-08-21 13:54:26.787896719 +0300

filename with space will break current clang-tidy-diff.py on all platforms,
the regular expression does not match quotes.
There is surely some Python package to process filenames correctly if this
ever become a problem.


2015-08-21 13:37 GMT+03:00 Alexander Kornienko :

> On Fri, Aug 21, 2015 at 11:27 AM, Yaron Keren via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
>> Author: yrnkrn
>> Date: Fri Aug 21 04:27:24 2015
>> New Revision: 245683
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=245683&view=rev
>> Log:
>> Tweak clang-tidy-diff.py to recognize "filename" in the diff ourput
>
>
> Out of curiosity, when does this happen? (I mean quotes around the file
> name)
>
>
>>
>>
>
>> Modified:
>> clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py
>>
>> Modified: clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py
>> URL:
>> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py?rev=245683&r1=245682&r2=245683&view=diff
>>
>> ==
>> --- clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py (original)
>> +++ clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py Fri Aug 21
>> 04:27:24 2015
>> @@ -67,7 +67,7 @@ def main():
>>filename = None
>>lines_by_file = {}
>>for line in sys.stdin:
>> -match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
>> +match = re.search('^\+\+\+\ \"?(.*?/){%s}([^ \t\"]*)' % args.p, line)
>>  if match:
>>filename = match.group(2)
>>  if filename == None:
>>
>>
>> ___
>> cfe-commits mailing list
>> cfe-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r246026 - Make FileManager::getFileSystemOptions consistent with CompilerInstance::getFileSystemOpts

2015-08-26 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Wed Aug 26 03:10:22 2015
New Revision: 246026

URL: http://llvm.org/viewvc/llvm-project?rev=246026&view=rev
Log:
Make FileManager::getFileSystemOptions consistent with 
CompilerInstance::getFileSystemOpts
and CompilerInvocation::getFileSystemOpts by renaming it to getFileSystemOpts,
marking the const-returning access method const and adding a non-const version,
making the function prototypes identical to CompilerInstance::getFileSystemOpts.


Modified:
cfe/trunk/include/clang/Basic/FileManager.h
cfe/trunk/lib/Serialization/ASTWriter.cpp

Modified: cfe/trunk/include/clang/Basic/FileManager.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/FileManager.h?rev=246026&r1=246025&r2=246026&view=diff
==
--- cfe/trunk/include/clang/Basic/FileManager.h (original)
+++ cfe/trunk/include/clang/Basic/FileManager.h Wed Aug 26 03:10:22 2015
@@ -218,7 +218,8 @@ public:
bool CacheFailure = true);
 
   /// \brief Returns the current file system options
-  const FileSystemOptions &getFileSystemOptions() { return FileSystemOpts; }
+  FileSystemOptions &getFileSystemOpts() { return FileSystemOpts; }
+  const FileSystemOptions &getFileSystemOpts() const { return FileSystemOpts; }
 
   IntrusiveRefCntPtr getVirtualFileSystem() const {
 return FS;

Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=246026&r1=246025&r2=246026&view=diff
==
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Wed Aug 26 03:10:22 2015
@@ -1326,8 +1326,8 @@ void ASTWriter::WriteControlBlock(Prepro
 
   // File system options.
   Record.clear();
-  const FileSystemOptions &FSOpts
-= Context.getSourceManager().getFileManager().getFileSystemOptions();
+  const FileSystemOptions &FSOpts =
+  Context.getSourceManager().getFileManager().getFileSystemOpts();
   AddString(FSOpts.WorkingDir, Record);
   Stream.EmitRecord(FILE_SYSTEM_OPTIONS, Record);
 


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


Re: [PATCH] D12466: Fix empty -L Path on OSX hosts

2015-08-29 Thread Yaron Keren via cfe-commits
yaron.keren added a comment.

I have never used OSX, Try to add one of the Apple clang developers as 
reviewers, they know more than me about OSX.

My guess there should not be empty paths in  in TC.getFilePaths(). That patch 
seems only to sidestep the issue which will probably surface in other places. 
Can you debug why this empty path is created and fix that?


Repository:
  rL LLVM

http://reviews.llvm.org/D12466



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


r246385 - Make test resistant to false matches of numbered (unnamed) labels inside other numbers.

2015-08-30 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sun Aug 30 10:24:46 2015
New Revision: 246385

URL: http://llvm.org/viewvc/llvm-project?rev=246385&view=rev
Log:
Make test resistant to false matches of numbered (unnamed) labels inside other 
numbers.

In release builds labels are numbers. Matching just the number may result
in false matches where the label is contained in other numbers, such as
14 inside [114 x i8]. A stricter match requiring start of line or > character
before the label avoids these false matches.


Modified:
cfe/trunk/test/CodeGen/sanitize-trap.c

Modified: cfe/trunk/test/CodeGen/sanitize-trap.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/sanitize-trap.c?rev=246385&r1=246384&r2=246385&view=diff
==
--- cfe/trunk/test/CodeGen/sanitize-trap.c (original)
+++ cfe/trunk/test/CodeGen/sanitize-trap.c Sun Aug 30 10:24:46 2015
@@ -7,19 +7,24 @@ int f(int x, int y) {
   // CHECK: %[[B4:.*]] = or i1 %[[B2]], %[[B3]]
   // CHECK: br i1 %[[B1]], label %[[L1:[0-9a-z_.]*]], label %[[L2:[0-9a-z_.]*]]
 
-  // CHECK: [[L2]]
+  // {{^|>}} used to match both Debug form of the captured label
+  // cont:
+  // and Release form
+  // ; 14
+  // But avoids false matches inside other numbers such as [114 x i8].
+  // CHECK: {{^|>}}[[L2]]
   // CHECK-NEXT: call void @llvm.trap()
   // CHECK-NEXT: unreachable
 
-  // CHECK: [[L1]]
+  // CHECK: {{^|>}}[[L1]]
   // CHECK-NEXT: br i1 %[[B4]], label %[[L3:[0-9a-z_.]*]], label 
%[[L4:[0-9a-z_.]*]]
 
-  // CHECK: [[L4]]
+  // CHECK: {{^|>}}[[L4]]
   // CHECK-NEXT: zext
   // CHECK-NEXT: zext
   // CHECK-NEXT: __ubsan_handle_divrem_overflow
 
-  // CHECK: [[L3]]
+  // CHECK: {{^|>}}[[L3]]
   // CHECK-NEXT: sdiv i32 %[[N]], %[[D]]
   return x / y;
 }


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


r246391 - Fix test for Release builds, the label form is :14, not 14.

2015-08-30 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sun Aug 30 12:46:43 2015
New Revision: 246391

URL: http://llvm.org/viewvc/llvm-project?rev=246391&view=rev
Log:
Fix test for Release builds, the label form is :14, not 14.


Modified:
cfe/trunk/test/CodeGen/sanitize-trap.c

Modified: cfe/trunk/test/CodeGen/sanitize-trap.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/sanitize-trap.c?rev=246391&r1=246390&r2=246391&view=diff
==
--- cfe/trunk/test/CodeGen/sanitize-trap.c (original)
+++ cfe/trunk/test/CodeGen/sanitize-trap.c Sun Aug 30 12:46:43 2015
@@ -7,24 +7,24 @@ int f(int x, int y) {
   // CHECK: %[[B4:.*]] = or i1 %[[B2]], %[[B3]]
   // CHECK: br i1 %[[B1]], label %[[L1:[0-9a-z_.]*]], label %[[L2:[0-9a-z_.]*]]
 
-  // {{^|>}} used to match both Debug form of the captured label
+  // {{^|:}} used to match both Debug form of the captured label
   // cont:
   // and Release form
-  // ; 14
+  // ; :14
   // But avoids false matches inside other numbers such as [114 x i8].
-  // CHECK: {{^|>}}[[L2]]
+  // CHECK: {{^|:}}[[L2]]
   // CHECK-NEXT: call void @llvm.trap()
   // CHECK-NEXT: unreachable
 
-  // CHECK: {{^|>}}[[L1]]
+  // CHECK: {{^|:}}[[L1]]
   // CHECK-NEXT: br i1 %[[B4]], label %[[L3:[0-9a-z_.]*]], label 
%[[L4:[0-9a-z_.]*]]
 
-  // CHECK: {{^|>}}[[L4]]
+  // CHECK: {{^|:}}[[L4]]
   // CHECK-NEXT: zext
   // CHECK-NEXT: zext
   // CHECK-NEXT: __ubsan_handle_divrem_overflow
 
-  // CHECK: {{^|>}}[[L3]]
+  // CHECK: {{^|:}}[[L3]]
   // CHECK-NEXT: sdiv i32 %[[N]], %[[D]]
   return x / y;
 }


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


r246520 - Fix path seperator for Windows.

2015-08-31 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Mon Aug 31 20:29:13 2015
New Revision: 246520

URL: http://llvm.org/viewvc/llvm-project?rev=246520&view=rev
Log:
Fix path seperator for Windows.


Modified:
cfe/trunk/test/Driver/solaris-ld.c

Modified: cfe/trunk/test/Driver/solaris-ld.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/solaris-ld.c?rev=246520&r1=246519&r2=246520&view=diff
==
--- cfe/trunk/test/Driver/solaris-ld.c (original)
+++ cfe/trunk/test/Driver/solaris-ld.c Mon Aug 31 20:29:13 2015
@@ -9,8 +9,8 @@
 // CHECK: "-cc1" "-triple" "sparc-sun-solaris2.11"
 // CHECK: ld{{.*}}"
 // CHECK: "--dynamic-linker" "{{.*}}/usr/lib/ld.so.1"
-// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2/crt1.o"
+// CHECK: 
"{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2{{/|}}crt1.o"
 // CHECK: "{{.*}}/usr/lib/crti.o"
-// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2/crtbegin.o"
-// CHECK: "{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2/crtend.o"
+// CHECK: 
"{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2{{/|}}crtbegin.o"
+// CHECK: 
"{{.*}}/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2{{/|}}crtend.o"
 // CHECK: "{{.*}}/usr/lib/crtn.o"


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


Re: r246534 - [modules] When emitting line tables, only emit filenames that are actually referenced by the entries that we emit.

2015-09-01 Thread Yaron Keren via cfe-commits
Hi Richard,

Since yesterday I see several clang test failures which *may* be related to
the series of patches of modules you comitted. These are:
 Clang :: Modules/cxx-templates.cpp
 Clang :: Modules/submodules-merge-defs.cpp
 Clang :: PCH/cxx-key-functions.cpp
 Clang :: PCH/cxx-templates.cpp

(failing as of r246534)

You can see these failing on clang-x64-ninja-win7 bot but you did not get
e-mail since it was masked by other test failing before them:

http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/4522

or on Takumi bot:

http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/2923

The bots do not seem to printout details, so here is debug stack dump with
symbols for the three tests failing. The fourth one prints huge AST.

Could you have a look?


  FAIL: Clang :: Modules/cxx-templates.cpp (4128 of 23311)
    TEST 'Clang :: Modules/cxx-templates.cpp' FAILED

   Script:
   --
   rm -rf
C:\llvm-clean\msvc\tools\clang\test\Modules\Output\cxx-templates.cpp.tmp
   not C:/llvm-clean/msvc/RELWITHDEBINFO/bin/clang.EXE -cc1
-internal-isystem C:\llvm-clean\msvc\RELWITHDEB
   INFO\bin\..\lib\clang\3.8.0\include -nostdsysteminc -x objective-c++
-fmodules -fimplicit-module-maps -fno-modules-error-recov
   ery
-fmodules-cache-path=C:\llvm-clean\msvc\tools\clang\test\Modules\Output\cxx-templates.cpp.tmp
-I C:\
   llvm-clean\tools\clang\test\Modules/Inputs
C:\llvm-clean\tools\clang\test\Modules\cxx-templates.cpp -std=c++11 -ast
   -dump-lookups | C:/llvm-clean/msvc/RELWITHDEBINFO/bin\FileCheck.EXE
C:\llvm-clean\tools\clang\test\Modul
   es\cxx-templates.cpp --check-prefix=CHECK-GLOBAL
   not C:/llvm-clean/msvc/RELWITHDEBINFO/bin/clang.EXE -cc1
-internal-isystem C:\llvm-clean\msvc\RELWITHDEB
   INFO\bin\..\lib\clang\3.8.0\include -nostdsysteminc -x objective-c++
-fmodules -fimplicit-module-maps -fno-modules-error-recov
   ery
-fmodules-cache-path=C:\llvm-clean\msvc\tools\clang\test\Modules\Output\cxx-templates.cpp.tmp
-I C:\
   llvm-clean\tools\clang\test\Modules/Inputs
C:\llvm-clean\tools\clang\test\Modules\cxx-templates.cpp -std=c++11 -ast
   -dump-lookups -ast-dump-filter N |
C:/llvm-clean/msvc/RELWITHDEBINFO/bin\FileCheck.EXE C:\llvm-clean\too
   ls\clang\test\Modules\cxx-templates.cpp --check-prefix=CHECK-NAMESPACE-N
   not C:/llvm-clean/msvc/RELWITHDEBINFO/bin/clang.EXE -cc1
-internal-isystem C:\llvm-clean\msvc\RELWITHDEB
   INFO\bin\..\lib\clang\3.8.0\include -nostdsysteminc -x objective-c++
-fmodules -fimplicit-module-maps -fno-modules-error-recov
   ery
-fmodules-cache-path=C:\llvm-clean\msvc\tools\clang\test\Modules\Output\cxx-templates.cpp.tmp
-I C:\
   llvm-clean\tools\clang\test\Modules/Inputs
C:\llvm-clean\tools\clang\test\Modules\cxx-templates.cpp -std=c++11 -ast
   -dump -ast-dump-filter SomeTemplate |
C:/llvm-clean/msvc/RELWITHDEBINFO/bin\FileCheck.EXE C:\llvm-clean\
   tools\clang\test\Modules\cxx-templates.cpp --check-prefix=CHECK-DUMP
   C:/llvm-clean/msvc/RELWITHDEBINFO/bin/clang.EXE -cc1 -internal-isystem
C:\llvm-clean\msvc\RELWITHDEBINFO
   \bin\..\lib\clang\3.8.0\include -nostdsysteminc -x objective-c++
-fmodules -fimplicit-module-maps -fno-modules-error-recovery

 
-fmodules-cache-path=C:\llvm-clean\msvc\tools\clang\test\Modules\Output\cxx-templates.cpp.tmp
-I C:\llvm
   -clean\tools\clang\test\Modules/Inputs
C:\llvm-clean\tools\clang\test\Modules\cxx-templates.cpp -verify -std=c++11
   C:/llvm-clean/msvc/RELWITHDEBINFO/bin/clang.EXE -cc1 -internal-isystem
C:\llvm-clean\msvc\RELWITHDEBINFO
   \bin\..\lib\clang\3.8.0\include -nostdsysteminc -x objective-c++
-fmodules -fimplicit-module-maps -fno-modules-error-recovery

 
-fmodules-cache-path=C:\llvm-clean\msvc\tools\clang\test\Modules\Output\cxx-templates.cpp.tmp
-I C:\llvm
   -clean\tools\clang\test\Modules/Inputs
C:\llvm-clean\tools\clang\test\Modules\cxx-templates.cpp -verify -std=c++11
   -DEARLY_IMPORT
   --
   Exit Code: 2

   Command Output (stdout):
   --
   Command 0: "rm" "-rf"
"C:\llvm-clean\msvc\tools\clang\test\Modules\Output\cxx-templates.cpp.tmp"
   Command 0 Result: 0
   Command 0 Output:


   Command 0 Stderr:


   Command 1: "not" "C:/llvm-clean/msvc/RELWITHDEBINFO/bin/clang.EXE"
"-cc1" "-internal-isystem" "C:\llvm-c
   lean\msvc\RELWITHDEBINFO\bin\..\lib\clang\3.8.0\include"
"-nostdsysteminc" "-x" "objective-c++" "-fmodules" "-fimplicit-module
   -maps" "-fno-modules-error-recovery"
"-fmodules-cache-path=C:\llvm-clean\msvc\tools\clang\test\Modules\Output\cxx-t
   emplates.cpp.tmp" "-I" "C:\llvm-clean\tools\clang\test\Modules/Inputs"
"C:\llvm-clean\tools\clang\test\M
   odules\cxx-templates.cpp" "-std=c++11" "-ast-dump-lookups"
   Command 1 Result: 1
   Command 1 Output:


   Command 1 Stderr:
   0x000140F97571 (0x0358BCC0 0x0358B969
0x0358B920 0x05F6E52F), llvm::OnDiskChainedHashTable

 ::find_hashed()
+ 0x41 bytes(s), c:\llvm-clean\include
   \llvm\support\ondiskhashtable.h, line 330 + 0x

Re: [clang-tools-extra] r245683 - Tweak clang-tidy-diff.py to recognize "filename" in the diff ourput.

2015-09-01 Thread Yaron Keren via cfe-commits
Hi,

In the other thread (search for ... 0ca9a2b from bartek-w) he provided a
regex with two more changes beyond adding \n.
Here are all three regexes:

pre-r245683
 match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
r245683
 match = re.search('^\+\+\+\ \"?(.*?/){%s}([^ \t\"]*)' % args.p, line)
bartek-w
 match = re.search('^+++\ \"?(.?/){%s}([^ \t\"\n])' % args.p, line)

in bartek-w version, + are not escaped which I do not understand why as +
is a special character in Python regex (see
https://docs.python.org/2/library/re.html) and  and the star after [^
\t\"\n] is missing.
Not wishing to break any working code I asked for the broken diff example
to test against before comitting and so far didn't get a reply.

Anyhow, adding the \n is safe and I've commited it now on r246575 but I'm
still not clear about the other two regex changes.
I'll update the bug report accordingly.

Yaron



2015-09-01 18:52 GMT+03:00 Alexander Kornienko :
>
> Looks like this patch broke handling of multiple files:
https://llvm.org/PR24637
>
> Can you take a look at this?
>
> On Fri, Aug 21, 2015 at 12:56 PM, Yaron Keren 
wrote:
>>
>> Whenever is any special character in the filename, such as space or
backslash (Windows), some examples:
>>
>> On Windows:
>> --- ".\\a.cpp"  2015-08-21 00:22:57.885370200 +0300
>> +++ b.cpp   2015-08-21 01:05:28.726269900 +0300
>>
>> --- ./a.cpp 2015-08-21 00:22:57.885370200 +0300
>> +++ b.cpp   2015-08-21 01:05:28.726269900 +0300
>>
>> --- "a a.cpp"   2015-08-21 00:22:57.885370200 +0300
>> +++ b.cpp   2015-08-21 01:05:28.726269900 +0300
>>
>> On Linux:
>> ~$ diff -U0 ./a.cpp b\ b.cpp
>> --- ./a.cpp 2015-08-14 00:27:03.569276652 +0300
>> +++ "b b.cpp"   2015-08-21 13:54:26.787896719 +0300
>>
>> filename with space will break current clang-tidy-diff.py on all
platforms, the regular expression does not match quotes.
>> There is surely some Python package to process filenames correctly if
this ever become a problem.
>>
>>
>> 2015-08-21 13:37 GMT+03:00 Alexander Kornienko :
>>>
>>> On Fri, Aug 21, 2015 at 11:27 AM, Yaron Keren via cfe-commits <
cfe-commits@lists.llvm.org> wrote:
>>>>
>>>> Author: yrnkrn
>>>> Date: Fri Aug 21 04:27:24 2015
>>>> New Revision: 245683
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=245683&view=rev
>>>> Log:
>>>> Tweak clang-tidy-diff.py to recognize "filename" in the diff ourput
>>>
>>>
>>> Out of curiosity, when does this happen? (I mean quotes around the file
name)
>>>
>>>>
>>>>
>>>>
>>>>
>>>> Modified:
>>>> clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py
>>>>
>>>> Modified: clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py
>>>> URL:
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py?rev=245683&r1=245682&r2=245683&view=diff
>>>>
==
>>>> --- clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py
(original)
>>>> +++ clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py Fri Aug
21 04:27:24 2015
>>>> @@ -67,7 +67,7 @@ def main():
>>>>filename = None
>>>>lines_by_file = {}
>>>>for line in sys.stdin:
>>>> -match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
>>>> +match = re.search('^\+\+\+\ \"?(.*?/){%s}([^ \t\"]*)' % args.p,
line)
>>>>  if match:
>>>>filename = match.group(2)
>>>>  if filename == None:
>>>>
>>>>
>>>> ___
>>>> cfe-commits mailing list
>>>> cfe-commits@lists.llvm.org
>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>>
>>>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] r246575 - Add \n to the regex in clang-tidy-diff.py in order to fix http://llvm.org/PR24637,

2015-09-01 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Tue Sep  1 14:08:17 2015
New Revision: 246575

URL: http://llvm.org/viewvc/llvm-project?rev=246575&view=rev
Log:
Add \n to the regex in clang-tidy-diff.py in order to fix 
http://llvm.org/PR24637,
git usecase for multiple files diff.


Modified:
clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py

Modified: clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py?rev=246575&r1=246574&r2=246575&view=diff
==
--- clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py (original)
+++ clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py Tue Sep  1 
14:08:17 2015
@@ -67,7 +67,7 @@ def main():
   filename = None
   lines_by_file = {}
   for line in sys.stdin:
-match = re.search('^\+\+\+\ \"?(.*?/){%s}([^ \t\"]*)' % args.p, line)
+match = re.search('^\+\+\+\ \"?(.*?/){%s}([^ \t\n\"]*)' % args.p, line)
 if match:
   filename = match.group(2)
 if filename == None:


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


Re: r246546 - Reverting r246497 (which requires also reverting r246524 and r246521 to avoid merge conflicts). It broke the build on MSVC 2015. It also broke an MSVC 2013 bot with testing issues.

2015-09-01 Thread Yaron Keren via cfe-commits
Thanks!


2015-09-01 16:24 GMT+03:00 Aaron Ballman via cfe-commits <
cfe-commits@lists.llvm.org>:

> Author: aaronballman
> Date: Tue Sep  1 08:24:39 2015
> New Revision: 246546
>
> URL: http://llvm.org/viewvc/llvm-project?rev=246546&view=rev
> Log:
> Reverting r246497 (which requires also reverting r246524 and r246521 to
> avoid merge conflicts). It broke the build on MSVC 2015. It also broke an
> MSVC 2013 bot with testing issues.
>
> llvm\tools\clang\lib\serialization\MultiOnDiskHashTable.h(117):
> error C2065: 'Files': undeclared identifier
>
> http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/2917
>
> Removed:
> cfe/trunk/lib/Serialization/MultiOnDiskHashTable.h
> Modified:
> cfe/trunk/include/clang/Serialization/ASTBitCodes.h
> cfe/trunk/include/clang/Serialization/ASTReader.h
> cfe/trunk/include/clang/Serialization/ASTWriter.h
> cfe/trunk/include/clang/Serialization/Module.h
> cfe/trunk/lib/Serialization/ASTReader.cpp
> cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
> cfe/trunk/lib/Serialization/ASTReaderInternals.h
> cfe/trunk/lib/Serialization/ASTWriter.cpp
> cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
> cfe/trunk/lib/Serialization/Module.cpp
> cfe/trunk/test/Modules/cxx-templates.cpp
> cfe/trunk/test/Modules/merge-using-decls.cpp
>
> Modified: cfe/trunk/include/clang/Serialization/ASTBitCodes.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTBitCodes.h?rev=246546&r1=246545&r2=246546&view=diff
>
> ==
> --- cfe/trunk/include/clang/Serialization/ASTBitCodes.h (original)
> +++ cfe/trunk/include/clang/Serialization/ASTBitCodes.h Tue Sep  1
> 08:24:39 2015
> @@ -1530,23 +1530,4 @@ namespace clang {
>}
>  } // end namespace clang
>
> -namespace llvm {
> -  template <> struct
> DenseMapInfo {
> -static clang::serialization::DeclarationNameKey getEmptyKey() {
> -  return clang::serialization::DeclarationNameKey(-1, 1);
> -}
> -static clang::serialization::DeclarationNameKey getTombstoneKey() {
> -  return clang::serialization::DeclarationNameKey(-1, 2);
> -}
> -static unsigned
> -getHashValue(const clang::serialization::DeclarationNameKey &Key) {
> -  return Key.getHash();
> -}
> -static bool isEqual(const clang::serialization::DeclarationNameKey &L,
> -const clang::serialization::DeclarationNameKey
> &R) {
> -  return L == R;
> -}
> -  };
> -}
> -
>  #endif
>
> Modified: cfe/trunk/include/clang/Serialization/ASTReader.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTReader.h?rev=246546&r1=246545&r2=246546&view=diff
>
> ==
> --- cfe/trunk/include/clang/Serialization/ASTReader.h (original)
> +++ cfe/trunk/include/clang/Serialization/ASTReader.h Tue Sep  1 08:24:39
> 2015
> @@ -282,8 +282,9 @@ class ReadMethodPoolVisitor;
>
>  namespace reader {
>class ASTIdentifierLookupTrait;
> -  /// \brief The on-disk hash table(s) used for DeclContext name lookup.
> -  struct DeclContextLookupTable;
> +  /// \brief The on-disk hash table used for the DeclContext's Name
> lookup table.
> +  typedef
> llvm::OnDiskIterableChainedHashTable
> +ASTDeclContextNameLookupTable;
>  }
>
>  } // end namespace serialization
> @@ -506,10 +507,6 @@ private:
>/// \brief Map from the TU to its lexical contents from each module
> file.
>std::vector> TULexicalDecls;
>
> -  /// \brief Map from a DeclContext to its lookup tables.
> -  llvm::DenseMap - serialization::reader::DeclContextLookupTable> Lookups;
> -
>// Updates for visible decls can occur for other contexts than just the
>// TU, and when we read those update records, the actual context may not
>// be available yet, so have this pending map using the ID as a key. It
> @@ -517,6 +514,7 @@ private:
>struct PendingVisibleUpdate {
>  ModuleFile *Mod;
>  const unsigned char *Data;
> +unsigned BucketOffset;
>};
>typedef SmallVector DeclContextVisibleUpdates;
>
> @@ -1091,10 +1089,6 @@ public:
>  Visit(GetExistingDecl(ID));
>}
>
> -  /// \brief Get the loaded lookup tables for \p Primary, if any.
> -  const serialization::reader::DeclContextLookupTable *
> -  getLoadedLookupTables(DeclContext *Primary) const;
> -
>  private:
>struct ImportedModule {
>  ModuleFile *Mod;
> @@ -1876,13 +1870,6 @@ public:
>/// Note: overrides method in ExternalASTSource
>Module *getModule(unsigned ID) override;
>
> -  /// \brief Retrieve the module file with a given local ID within the
> specified
> -  /// ModuleFile.
> -  ModuleFile *getLocalModuleFile(ModuleFile &M, unsigned ID);
> -
> -  /// \brief Get an ID for the given module file.
> -  unsigned getModuleFileID(ModuleFile *M);
> -
>/// \brief Return a descriptor for the corresponding module

Move createEliminateAvailableExternallyPass earlier

2015-09-01 Thread Yaron Keren via cfe-commits
Following the discussion on cfe-dev, this
moves createEliminateAvailableExternallyPass earlier in the pass pipeline
to save running many ModulePasses on available external functions that are
thrown away anyhow.
Index: lib/Transforms/IPO/PassManagerBuilder.cpp
===
--- lib/Transforms/IPO/PassManagerBuilder.cpp   (revision 246535)
+++ lib/Transforms/IPO/PassManagerBuilder.cpp   (working copy)
@@ -331,6 +331,19 @@
   // we must insert a no-op module pass to reset the pass manager.
   MPM.add(createBarrierNoopPass());
 
+  if (!DisableUnitAtATime && OptLevel > 1 && !PrepareForLTO) {
+// Remove avail extern fns and globals definitions if we aren't
+// compiling an object file for later LTO. For LTO we want to preserve
+// these so they are eligible for inlining at link-time. Note if they
+// are unreferenced they will be removed by GlobalDCE later, so
+// this only impacts referenced available externally globals.
+// Eventually they will be suppressed during codegen, but eliminating
+// here enables more opportunity for GlobalDCE as it may make
+// globals referenced by available external functions dead
+// and saves running remaining passes on the eliminated functions.
+MPM.add(createEliminateAvailableExternallyPass());
+  }
+
   if (EnableNonLTOGlobalsModRef)
 // We add a fresh GlobalsModRef run at this point. This is particularly
 // useful as the above will have inlined, DCE'ed, and function-attr
@@ -438,17 +451,6 @@
 // GlobalOpt already deletes dead functions and globals, at -O2 try a
 // late pass of GlobalDCE.  It is capable of deleting dead cycles.
 if (OptLevel > 1) {
-  if (!PrepareForLTO) {
-// Remove avail extern fns and globals definitions if we aren't
-// compiling an object file for later LTO. For LTO we want to preserve
-// these so they are eligible for inlining at link-time. Note if they
-// are unreferenced they will be removed by GlobalDCE below, so
-// this only impacts referenced available externally globals.
-// Eventually they will be suppressed during codegen, but eliminating
-// here enables more opportunity for GlobalDCE as it may make
-// globals referenced by available external functions dead.
-MPM.add(createEliminateAvailableExternallyPass());
-  }
   MPM.add(createGlobalDCEPass()); // Remove dead fns and globals.
   MPM.add(createConstantMergePass()); // Merge dup global constants
 }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Move createEliminateAvailableExternallyPass earlier

2015-09-02 Thread Yaron Keren via cfe-commits
r246619, thanks!
About createEliminateAvailableExternallyPass for LTO, I'm missing
something. At link time, aren't available externally function supposed to
be, well, available as external linkage? Won't the link fail without these
versions?
if so, why keep the available externally versions at all for LTO instead of
using the external linkage versions?


2015-09-01 23:56 GMT+03:00 Teresa Johnson :

> Hi Yaron,
>
> Thanks, moving it earlier in general seems ok to me. I originally put
> this right before the GlobalDCE calls because it was somewhat related.
> I wonder if the createEliminateAvailableExternallyPass call for the
> LTO pipeline should similarly be moved up closer to inlining, perhaps
> after any IP alias analysis passes? Hopefully someone more familiar
> with the passes than I will comment on how early we can do this.
>
> Teresa
>
> On Tue, Sep 1, 2015 at 1:32 PM, Yaron Keren via cfe-commits
>  wrote:
> > Following the discussion on cfe-dev, this moves
> > createEliminateAvailableExternallyPass earlier in the pass pipeline to
> save
> > running many ModulePasses on available external functions that are thrown
> > away anyhow.
> >
> >
> > ___
> > cfe-commits mailing list
> > cfe-commits@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
> >
>
>
>
> --
> Teresa Johnson | Software Engineer | tejohn...@google.com | 408-460-2413
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-03 Thread Yaron Keren via cfe-commits
yaron.keren added a comment.

In CGCXX.cpp, may be fixable after this commit:

  // FIXME: An extern template instantiation will create functions with
  // linkage "AvailableExternally". In libc++, some classes also define
  // members with attribute "AlwaysInline" and expect no reference to
  // be generated. It is desirable to reenable this optimisation after
  // corresponding LLVM changes.


Repository:
  rL LLVM

http://reviews.llvm.org/D12087



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


Patch for PR23472

2015-09-03 Thread Yaron Keren via cfe-commits
http://llvm.org/pr23472

As suggested by Reid, OK to commit?
Index: tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
===
--- tools/clang/lib/CodeGen/ItaniumCXXABI.cpp   (revision 246575)
+++ tools/clang/lib/CodeGen/ItaniumCXXABI.cpp   (working copy)
@@ -1826,7 +1826,8 @@
 // The ABI says: It is suggested that it be emitted in the same COMDAT 
group
 // as the associated data object
 llvm::Comdat *C = var->getComdat();
-if (!D.isLocalVarDecl() && C) {
+if (!D.isLocalVarDecl() && C &&
+CGM.getTarget().getTriple().isOSBinFormatELF()) {
   guard->setComdat(C);
   CGF.CurFn->setComdat(C);
 } else if (CGM.supportsCOMDAT() && guard->isWeakForLinker()) {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: Patch for PR23472

2015-09-03 Thread Yaron Keren via cfe-commits
r246803, thanks!


2015-09-03 23:16 GMT+03:00 Reid Kleckner :

> LGTM, but I would expand on the comment a bit:
>  // The ABI says: "It is suggested that it be emitted in the same
> COMDAT group
>  // as the associated data object." In practice, this doesn't work for
> non-ELF object formats, so only do it for ELF.
>

On Thu, Sep 3, 2015 at 11:31 AM, Rafael Espíndola <
rafael.espind...@gmail.com> wrote:

> I fully trust Reid review on this, so OK with me.
>
> On 3 September 2015 at 14:04, Yaron Keren  wrote:
> > http://llvm.org/pr23472
> >
> > As suggested by Reid, OK to commit?
> >
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r250921 - Rename clang config.h include guard from CONFIG_H to CLANG_CONFIG_H

2015-10-21 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Wed Oct 21 13:16:01 2015
New Revision: 250921

URL: http://llvm.org/viewvc/llvm-project?rev=250921&view=rev
Log:
Rename clang config.h include guard from CONFIG_H to CLANG_CONFIG_H
to make it different from LLVM config.h include guard.


Modified:
cfe/trunk/include/clang/Config/config.h.cmake
cfe/trunk/include/clang/Config/config.h.in

Modified: cfe/trunk/include/clang/Config/config.h.cmake
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Config/config.h.cmake?rev=250921&r1=250920&r2=250921&view=diff
==
--- cfe/trunk/include/clang/Config/config.h.cmake (original)
+++ cfe/trunk/include/clang/Config/config.h.cmake Wed Oct 21 13:16:01 2015
@@ -1,9 +1,9 @@
 /* This generated file is for internal use. Do not include it from headers. */
 
-#ifdef CONFIG_H
+#ifdef CLANG_CONFIG_H
 #error config.h can only be included once
 #else
-#define CONFIG_H
+#define CLANG_CONFIG_H
 
 /* Bug report URL. */
 #define BUG_REPORT_URL "${BUG_REPORT_URL}"

Modified: cfe/trunk/include/clang/Config/config.h.in
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Config/config.h.in?rev=250921&r1=250920&r2=250921&view=diff
==
--- cfe/trunk/include/clang/Config/config.h.in (original)
+++ cfe/trunk/include/clang/Config/config.h.in Wed Oct 21 13:16:01 2015
@@ -1,9 +1,9 @@
 /* This generated file is for internal use. Do not include it from headers. */
 
-#ifdef CONFIG_H
+#ifdef CLANG_CONFIG_H
 #error config.h can only be included once
 #else
-#define CONFIG_H
+#define CLANG_CONFIG_H
 
 /* Bug report URL. */
 #undef BUG_REPORT_URL


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


Re: r251567 - Fix the calling convention of Mingw64 long double values

2015-10-28 Thread Yaron Keren via cfe-commits
Thanks!


2015-10-29 0:29 GMT+02:00 Reid Kleckner via cfe-commits <
cfe-commits@lists.llvm.org>:

> Author: rnk
> Date: Wed Oct 28 17:29:52 2015
> New Revision: 251567
>
> URL: http://llvm.org/viewvc/llvm-project?rev=251567&view=rev
> Log:
> Fix the calling convention of Mingw64 long double values
>
> GCC uses the x87DoubleExtended model for long doubles, and passes them
> indirectly by address through function calls.
>
> Also replace the existing mingw-long-double assembly emitting test with
> an IR-level test.
>
> Modified:
> cfe/trunk/lib/Basic/Targets.cpp
> cfe/trunk/lib/CodeGen/TargetInfo.cpp
> cfe/trunk/test/CodeGen/mingw-long-double.c
>
> Modified: cfe/trunk/lib/Basic/Targets.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=251567&r1=251566&r2=251567&view=diff
>
> ==
> --- cfe/trunk/lib/Basic/Targets.cpp (original)
> +++ cfe/trunk/lib/Basic/Targets.cpp Wed Oct 28 17:29:52 2015
> @@ -4009,7 +4009,13 @@ public:
>  class MinGWX86_64TargetInfo : public WindowsX86_64TargetInfo {
>  public:
>MinGWX86_64TargetInfo(const llvm::Triple &Triple)
> -  : WindowsX86_64TargetInfo(Triple) {}
> +  : WindowsX86_64TargetInfo(Triple) {
> +// Mingw64 rounds long double size and alignment up to 16 bytes, but
> sticks
> +// with x86 FP ops. Weird.
> +LongDoubleWidth = LongDoubleAlign = 128;
> +LongDoubleFormat = &llvm::APFloat::x87DoubleExtended;
> +  }
> +
>void getTargetDefines(const LangOptions &Opts,
>  MacroBuilder &Builder) const override {
>  WindowsX86_64TargetInfo::getTargetDefines(Opts, Builder);
>
> Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=251567&r1=251566&r2=251567&view=diff
>
> ==
> --- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
> +++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Wed Oct 28 17:29:52 2015
> @@ -1772,12 +1772,10 @@ public:
>
>  /// WinX86_64ABIInfo - The Windows X86_64 ABI information.
>  class WinX86_64ABIInfo : public ABIInfo {
> -
> -  ABIArgInfo classify(QualType Ty, unsigned &FreeSSERegs,
> -  bool IsReturnType) const;
> -
>  public:
> -  WinX86_64ABIInfo(CodeGen::CodeGenTypes &CGT) : ABIInfo(CGT) {}
> +  WinX86_64ABIInfo(CodeGen::CodeGenTypes &CGT)
> +  : ABIInfo(CGT),
> +IsMingw64(getTarget().getTriple().isWindowsGNUEnvironment()) {}
>
>void computeInfo(CGFunctionInfo &FI) const override;
>
> @@ -1794,6 +1792,12 @@ public:
>  // FIXME: Assumes vectorcall is in use.
>  return isX86VectorCallAggregateSmallEnough(NumMembers);
>}
> +
> +private:
> +  ABIArgInfo classify(QualType Ty, unsigned &FreeSSERegs,
> +  bool IsReturnType) const;
> +
> +  bool IsMingw64;
>  };
>
>  class X86_64TargetCodeGenInfo : public TargetCodeGenInfo {
> @@ -3317,7 +3321,7 @@ ABIArgInfo WinX86_64ABIInfo::classify(Qu
>
>TypeInfo Info = getContext().getTypeInfo(Ty);
>uint64_t Width = Info.Width;
> -  unsigned Align =
> getContext().toCharUnitsFromBits(Info.Align).getQuantity();
> +  CharUnits Align = getContext().toCharUnitsFromBits(Info.Align);
>
>const RecordType *RT = Ty->getAs();
>if (RT) {
> @@ -3330,9 +3334,9 @@ ABIArgInfo WinX86_64ABIInfo::classify(Qu
>return getNaturalAlignIndirect(Ty, /*ByVal=*/false);
>
>  // FIXME: mingw-w64-gcc emits 128-bit struct as i128
> -if (Width == 128 && getTarget().getTriple().isWindowsGNUEnvironment())
> -  return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(),
> -  Width));
> +if (Width == 128 && IsMingw64)
> +  return ABIArgInfo::getDirect(
> +  llvm::IntegerType::get(getVMContext(), Width));
>}
>
>// vectorcall adds the concept of a homogenous vector aggregate,
> similar to
> @@ -3346,8 +3350,7 @@ ABIArgInfo WinX86_64ABIInfo::classify(Qu
>  return ABIArgInfo::getDirect();
>return ABIArgInfo::getExpand();
>  }
> -return ABIArgInfo::getIndirect(CharUnits::fromQuantity(Align),
> -   /*ByVal=*/false);
> +return ABIArgInfo::getIndirect(Align, /*ByVal=*/false);
>}
>
>
> @@ -3375,6 +3378,14 @@ ABIArgInfo WinX86_64ABIInfo::classify(Qu
>if (BT && BT->getKind() == BuiltinType::Bool)
>  return ABIArgInfo::getExtend();
>
> +  // Mingw64 GCC uses the old 80 bit extended precision floating point
> unit. It
> +  // passes them indirectly through memory.
> +  if (IsMingw64 && BT && BT->getKind() == BuiltinType::LongDouble) {
> +const llvm::fltSemantics *LDF = &getTarget().getLongDoubleFormat();
> +if (LDF == &llvm::APFloat::x87DoubleExtended)
> +  return ABIArgInfo::getIndirect(Align, /*ByVal=*/false);
> +  }
> +
>return ABIArgInfo::getDirect();
>  }
>
>
> Modified: cfe/

Re: [PATCH] D14164: Driver: fallback to parent directory of clang if no sysroot for mingw-w64 target

2015-11-03 Thread Yaron Keren via cfe-commits
yaron.keren added a subscriber: cfe-commits.
yaron.keren added a comment.

We did  not have cfe-commits as subscriber so I'm adding it now (this is a 
clang commit), see if someone would like to further comment.


http://reviews.llvm.org/D14164



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


Re: [PATCH] D14164: Driver: fallback to parent directory of clang if no sysroot for mingw-w64 target

2015-11-04 Thread Yaron Keren via cfe-commits
yaron.keren accepted this revision.
yaron.keren added a reviewer: yaron.keren.
yaron.keren added a comment.
This revision is now accepted and ready to land.

The formatting is wrong, aligned to the right, clang-format the new code.

Can we control getInstalledDir() when running under LIT so this could be 
tested? if possible, add a test before committing.

LGTM.


http://reviews.llvm.org/D14164



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


r252404 - Remove spaces at start of line, NFC.

2015-11-07 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sat Nov  7 10:24:52 2015
New Revision: 252404

URL: http://llvm.org/viewvc/llvm-project?rev=252404&view=rev
Log:
Remove spaces at start of line, NFC.


Modified:
cfe/trunk/include/clang/Frontend/CompilerInvocation.h

Modified: cfe/trunk/include/clang/Frontend/CompilerInvocation.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CompilerInvocation.h?rev=252404&r1=252403&r2=252404&view=diff
==
--- cfe/trunk/include/clang/Frontend/CompilerInvocation.h (original)
+++ cfe/trunk/include/clang/Frontend/CompilerInvocation.h Sat Nov  7 10:24:52 
2015
@@ -72,7 +72,7 @@ public:
   ~CompilerInvocationBase();
 
   CompilerInvocationBase(const CompilerInvocationBase &X);
-  
+
   LangOptions *getLangOpts() { return LangOpts.get(); }
   const LangOptions *getLangOpts() const { return LangOpts.get(); }
 


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


r252405 - Remove spaces in empty line, NFC.

2015-11-07 Thread Yaron Keren via cfe-commits
Author: yrnkrn
Date: Sat Nov  7 10:35:07 2015
New Revision: 252405

URL: http://llvm.org/viewvc/llvm-project?rev=252405&view=rev
Log:
Remove spaces in empty line, NFC.


Modified:
cfe/trunk/lib/Lex/PPLexerChange.cpp

Modified: cfe/trunk/lib/Lex/PPLexerChange.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPLexerChange.cpp?rev=252405&r1=252404&r2=252405&view=diff
==
--- cfe/trunk/lib/Lex/PPLexerChange.cpp (original)
+++ cfe/trunk/lib/Lex/PPLexerChange.cpp Sat Nov  7 10:35:07 2015
@@ -121,7 +121,7 @@ void Preprocessor::EnterSourceFileWithLe
   CurSubmodule = nullptr;
   if (CurLexerKind != CLK_LexAfterModuleImport)
 CurLexerKind = CLK_Lexer;
-  
+
   // Notify the client, if desired, that we are in a new source file.
   if (Callbacks && !CurLexer->Is_PragmaLexer) {
 SrcMgr::CharacteristicKind FileType =


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


  1   2   >