Re: [PATCH] D23938: clang-cl: Accept MSVC 2015's `/execution-charset:utf-8` flag.

2016-08-26 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/Driver/Tools.cpp:5838-5846 @@ -5837,11 +5837,11 @@ StringRef value = inputCharset->getValue(); if (value.lower() != "utf-8") D.Diag(diag::err_drv_invalid_value) << inputCharset->getAsString(Args)

Re: [PATCH] D23938: clang-cl: Accept MSVC 2015's `/execution-charset:utf-8` flag.

2016-08-26 Thread David Majnemer via cfe-commits
On Friday, August 26, 2016, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > thakis created this revision. > thakis added a reviewer: hans. > thakis added a subscriber: cfe-commits. > > Like https://reviews.llvm.org/D23807, but for execution-charset. > > https://reviews.llvm.org/D

Re: [PATCH] D22334: Fix for Bug 28172 : clang crashes on invalid code (with too few arguments to __builtin_signbit) without any proper diagnostics.

2016-08-26 Thread David Majnemer via cfe-commits
majnemer added a comment. This looks much better. Please add a test that uses a template: template int f(T t) { return __builtin_signbit(t); } Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7401-7403 @@ -7400,2 +7400,5 @@ +def err_builtin_signbit_wrong_argument :

Re: [PATCH] D23805: clang-cl: Make /Brepro actually work.

2016-08-23 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D23805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

r278656 - [CodeGen] Ignore unnamed bitfields before handling vector fields

2016-08-15 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Aug 15 02:20:40 2016 New Revision: 278656 URL: http://llvm.org/viewvc/llvm-project?rev=278656&view=rev Log: [CodeGen] Ignore unnamed bitfields before handling vector fields We processed unnamed bitfields after our logic for non-vector field elements in records larger th

r278655 - [CodeGen] Correctly implement the AVX512 psABI rules

2016-08-14 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Aug 15 01:39:18 2016 New Revision: 278655 URL: http://llvm.org/viewvc/llvm-project?rev=278655&view=rev Log: [CodeGen] Correctly implement the AVX512 psABI rules An __m512 vector type wrapped in a structure should be passed in a vector register. Our prior implementation

Re: [PATCH] D23329: [NFC] Reducing allocations in AST attributes

2016-08-12 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer accepted this revision. majnemer added a reviewer: majnemer. majnemer added a comment. This revision is now accepted and ready to land. LGTM Comment at: include/clang/AST/AttrIterator.h:42 @@ -41,3 +41,3 @@ /// AttrVec - A vector

Re: [PATCH] D23453: Add a c2x language mode

2016-08-12 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: include/clang/Frontend/LangStandards.def:94 @@ -93,1 +93,3 @@ +// C2X modes +LANGSTANDARD(c2x, "c2x", Should this be C2x instead of C2X? https://reviews.llvm.org/D23453 _

Re: [PATCH] D23385: Implement __attribute__((require_constant_initialization)) for safe static initialization.

2016-08-12 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10388-10390 @@ -10387,2 +10387,5 @@ + // Cache the result of checking for constant initialization. + Optional HasConstInit; + if (var->getTLSKind() == VarDecl::TLS_Static) { You could use a l

r277953 - Update clang tests for LLVM r277950

2016-08-07 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Aug 7 03:28:58 2016 New Revision: 277953 URL: http://llvm.org/viewvc/llvm-project?rev=277953&view=rev Log: Update clang tests for LLVM r277950 We infer inbounds on GEPs of allocas leading to minor perturbations in tests. Modified: cfe/trunk/test/CodeGenObjCXX/exce

Re: [PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t

2016-08-05 Thread David Majnemer via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D23086#507203, @yaxunl wrote: > How about assuming ndrange_t is a struct type defined by user and identify it > by struct type name in Clang? This gives user freedom of implementing it > differently than SPIR. In opencl-c.h define it as a st

r277840 - [SemaOpenMP] Some miscellaneous cleanups

2016-08-05 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Aug 5 12:44:54 2016 New Revision: 277840 URL: http://llvm.org/viewvc/llvm-project?rev=277840&view=rev Log: [SemaOpenMP] Some miscellaneous cleanups Clean up some typos, follow the coding style a little more rigorously. No functionality change is intended. Modified:

Re: [PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t

2016-08-05 Thread David Majnemer via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D23086#507098, @Anastasia wrote: > In https://reviews.llvm.org/D23086#507055, @majnemer wrote: > > > This approach seems wrong to me. > > > > Instead, why not just make `ndrange_t` a typedef of a real struct in > > `Sema::Initialize`? > > > I

Re: [PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t

2016-08-05 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer requested changes to this revision. majnemer added a reviewer: majnemer. majnemer added a comment. This revision now requires changes to proceed. This approach seems wrong to me. Instead, why not just make `ndrange_t` a typedef of a real struct in

Re: r277787 - [Sema] Add sizeof diagnostics for bzero

2016-08-05 Thread David Majnemer via cfe-commits
On Thu, Aug 4, 2016 at 4:55 PM, Bruno Cardoso Lopes via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: bruno > Date: Thu Aug 4 18:55:22 2016 > New Revision: 277787 > > URL: http://llvm.org/viewvc/llvm-project?rev=277787&view=rev > Log: > [Sema] Add sizeof diagnostics for bzero > > For

Re: [PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)

2016-08-04 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: include/clang/CodeGen/CGFunctionInfo.h:479 @@ +478,3 @@ + /// Whether this function saved caller registers. + unsigned NoCallerSavedRegs : 1; + aaron.ballman wrote: > erichkeane wrote: > > aaron.ballman wrote: >

Re: [PATCH] D23168: emit_DW_AT_noreturn flag

2016-08-04 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer requested changes to this revision. majnemer added a reviewer: majnemer. majnemer added a comment. This revision now requires changes to proceed. This has no tests. https://reviews.llvm.org/D23168 ___

r277352 - [Parse] Let declarations follow labels in -fms-extensions mode

2016-08-01 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Aug 1 11:39:29 2016 New Revision: 277352 URL: http://llvm.org/viewvc/llvm-project?rev=277352&view=rev Log: [Parse] Let declarations follow labels in -fms-extensions mode MSVC permits declarations in these places as conforming extension (it is a constraint violation oth

Re: [PATCH] D22900: Revert r244207 - Mark calls in thunk functions as tail-call optimization

2016-08-01 Thread David Majnemer via cfe-commits
On Sun, Jul 31, 2016 at 10:32 PM, Gerolf Hoflehner wrote: > > > On Jul 31, 2016, at 1:46 AM, Amjad Aboud wrote: > > > > aaboud added a comment. > > > >> ISTM that the DWARF spec intended such thunks to be encoded as > `DW_AT_trampoline`. That seems more appropriate than relying on codegen > emi

Re: [PATCH] D22900: Revert r244207 - Mark calls in thunk functions as tail-call optimization

2016-07-31 Thread David Majnemer via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D22900#501597, @aaboud wrote: > Reverting https://reviews.llvm.org/rL244207, would be fine if we assure that > PR24235, is fixed in another way. > I added Reid who helped reviewing the original patch > https://reviews.llvm.org/D11476. IST

Re: [PATCH] D22970: Ensure Ident_GNU_final is properly initialized in the Parser Initialize function

2016-07-29 Thread David Majnemer via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL277206: Ensure Ident_GNU_final is properly initialized in the Parser Initialize function (authored by majnemer). Changed prior to commit: https://reviews.llvm.org/D22970?vs=66158&id=66165#toc Repositor

r277206 - Ensure Ident_GNU_final is properly initialized in the Parser Initialize function

2016-07-29 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Jul 29 15:01:12 2016 New Revision: 277206 URL: http://llvm.org/viewvc/llvm-project?rev=277206&view=rev Log: Ensure Ident_GNU_final is properly initialized in the Parser Initialize function The recent change implementing __final forgot to initialize a variable. This was

Re: [PATCH] D22931: Add __declspec code_seg support

2016-07-28 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer requested changes to this revision. majnemer added a reviewer: majnemer. majnemer added a comment. This revision now requires changes to proceed. Thanks for contributing this! I actually worked on an implementation of this feature but never sent it

Re: [PATCH] D22919: GCC Compatibility: Support for __final specifier

2016-07-28 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM as-is, clang's behavior would be congruent with GCC's. Comment at: lib/Parse/ParseDeclCXX.cpp:3024-3026 @@ -3013,2 +3023,5 @@ Diag(FinalLoc, diag::ext_ms_seale

Re: [PATCH] D22900: Revert r244207 - Mark calls in thunk functions as tail-call optimization

2016-07-27 Thread David Majnemer via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D22900#498793, @Gerolf wrote: > Nope, I don't see the tail call. Anyway, I'll simplify my test case. Don't > worry about it. > > clang++ -cc1 -x c++ -emit-llvm -triple i386-apple-darwin9 t.cpp > > cat t.ll: > > ; ModuleID = 't.cpp' > source_

Re: [PATCH] D22900: Revert r244207 - Mark calls in thunk functions as tail-call optimization

2016-07-27 Thread David Majnemer via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D22900#498781, @Gerolf wrote: > Please add the options you used to compile? I can certainly shrink the test > case a bit before I commit. clang -cc1 -x c++ -emit-llvm -triple i386-apple-darwin9 t.ii -o - https://reviews.llvm.org/D22900

Re: [PATCH] D22900: Revert r244207 - Mark calls in thunk functions as tail-call optimization

2016-07-27 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. The test seems a little large, the following shows that we emit a tail call with a byval argument on trunk. struct LARGE { union { int i; }; }; struct I { virtual void m_fn1(LARGE); }; struct CBase {

Re: r276350 - [CodeGen] Fix a crash when constant folding switch statement

2016-07-27 Thread David Majnemer via cfe-commits
I hear that he is on vacation. On Wednesday, July 27, 2016, Hans Wennborg via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Richard: ping? > > On Fri, Jul 22, 2016 at 7:00 AM, Hans Wennborg > wrote: > > Richard: should we merge this to 3.9? > > > > On Thu, Jul 21, 2016 at 6:31 PM, Erik Pilk

Re: [PATCH] D22818: [libcxx] [test] Silence another occurrence of MSVC's spurious unused warning.

2016-07-26 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. Do we have a way to keep track of this change so we can remove it when MSVC gets fixed? https://reviews.llvm.org/D22818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

r276756 - Update for LLVM changes

2016-07-26 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue Jul 26 10:21:18 2016 New Revision: 276756 URL: http://llvm.org/viewvc/llvm-project?rev=276756&view=rev Log: Update for LLVM changes InstSimplify has gained the ability to remove needless bitcasts which perturbed some clang codegen tests. Modified: cfe/trunk/test/Co

Re: [ReviewRequest] [Sema/Parser] GCC Compatibility Patch: Support for __final specifier

2016-07-25 Thread David Majnemer via cfe-commits
You've added a comment describing the new enum value. Please make sure the comment starts with a cap letter and ends with a period. On Mon, Jul 25, 2016 at 4:09 PM, Keane, Erich wrote: > Thanks for the quick review! I’ve updated the patch with the name changes > in the attached diff file. > >

Re: [ReviewRequest] [Sema/Parser] GCC Compatibility Patch: Support for __final specifier

2016-07-25 Thread David Majnemer via cfe-commits
I'd rename VS_Alt_Final to VS_GNU_Final. On Mon, Jul 25, 2016 at 2:24 PM, Keane, Erich via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi all, my first potential-contribution, so I apologize if I’m submitting > this improperly, I’m unfamiliar with the ‘type’ keys that you use in the > topi

r276606 - [MSVCToolChain] Guard hardcoded Windows paths with LLVM_ON_WIN32

2016-07-24 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Jul 24 23:47:44 2016 New Revision: 276606 URL: http://llvm.org/viewvc/llvm-project?rev=276606&view=rev Log: [MSVCToolChain] Guard hardcoded Windows paths with LLVM_ON_WIN32 Paths like C:/foo will never work on UNIX platforms, don't bother implicitly adding them to the s

r276607 - Update test to account for r276604

2016-07-24 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Jul 24 23:47:45 2016 New Revision: 276607 URL: http://llvm.org/viewvc/llvm-project?rev=276607&view=rev Log: Update test to account for r276604 Modified: cfe/trunk/test/CodeGenCXX/atomicinit.cpp Modified: cfe/trunk/test/CodeGenCXX/atomicinit.cpp URL: http://llvm.or

r276573 - [Driver] Switch some getenv calls to llvm::sys::Process::GetEnv

2016-07-24 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Jul 24 12:44:03 2016 New Revision: 276573 URL: http://llvm.org/viewvc/llvm-project?rev=276573&view=rev Log: [Driver] Switch some getenv calls to llvm::sys::Process::GetEnv No functional change is intended. Modified: cfe/trunk/lib/Driver/Driver.cpp cfe/trunk/lib

r276352 - [Sema] Handle errors during rewriteBuiltinFunctionDecl

2016-07-21 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu Jul 21 18:03:43 2016 New Revision: 276352 URL: http://llvm.org/viewvc/llvm-project?rev=276352&view=rev Log: [Sema] Handle errors during rewriteBuiltinFunctionDecl rewriteBuiltinFunctionDecl can encounter errors when performing DefaultFunctionArrayLvalueConversion. Thes

r276014 - Let FuncAttrs infer the 'returned' argument attribute

2016-07-19 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue Jul 19 14:59:24 2016 New Revision: 276014 URL: http://llvm.org/viewvc/llvm-project?rev=276014&view=rev Log: Let FuncAttrs infer the 'returned' argument attribute This reverts commit r275756. Modified: cfe/trunk/test/CodeGen/ppc64-struct-onevect.c cfe/trunk/test

Re: [PATCH] D18360: Add AIX Target/ToolChain to Clang Driver

2016-07-19 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a reviewer: majnemer. majnemer added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D18360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

Re: [PATCH] D18360: Add AIX Target/ToolChain to Clang Driver

2016-07-18 Thread David Majnemer via cfe-commits
majnemer added a comment. Could you please attach a diff with additional context? Comment at: lib/Driver/ToolChains.cpp:3717-3735 @@ -3678,1 +3716,21 @@ + // We need a detected GCC installation on Linux to provide libstdc++'s + // headers. We handled the libc++ case above. +

Re: [PATCH] D18360: Add AIX Target/ToolChain to Clang Driver

2016-07-18 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/Basic/Targets.cpp:718 @@ +717,3 @@ +Builder.defineMacro("_LONG_LONG"); +Builder.defineMacro("_ALL_SOURCE"); +Builder.defineMacro("_REENTRANT"); apaprocki wrote: > majnemer wrote: > > Are we really suppose

Re: [PATCH] D18360: Add AIX Target/ToolChain to Clang Driver

2016-07-18 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/Basic/Targets.cpp:718 @@ +717,3 @@ +Builder.defineMacro("_LONG_LONG"); +Builder.defineMacro("_ALL_SOURCE"); +Builder.defineMacro("_REENTRANT"); Are we really supposed to define this macro? Does GC

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-07-18 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/Headers/Intrin.h:841-874 @@ -840,44 +840,36 @@ #if defined(__i386__) || defined(__x86_64__) static __inline__ void __DEFAULT_FN_ATTRS __movsb(unsigned char *__dst, unsigned char const *__src, size_t __n) { - __asm__("rep m

Re: [PATCH] D22426: Fix automatic detection of ARM MSVC toolset in clang.exe

2016-07-17 Thread David Majnemer via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D22426#486605, @compnerd wrote: > I was worried about the OOM situation with the 32-bit toolchain. As long as > there is a way to get to the 64-bit version, I don't think that it matters > too much that we default to x86. It sounds like ev

r275699 - [CodeGen] Some assorted cleanups

2016-07-16 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sat Jul 16 19:39:12 2016 New Revision: 275699 URL: http://llvm.org/viewvc/llvm-project?rev=275699&view=rev Log: [CodeGen] Some assorted cleanups No functional change, just some cleanups: - Use auto when it is appropriate. - There were some strange static_casts which were su

Re: [PATCH] D22334: Fix for Bug 28172 : clang crashes on invalid code (with too few arguments to __builtin_signbit) without any proper diagnostics.

2016-07-15 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer requested changes to this revision. majnemer added a reviewer: majnemer. majnemer added a comment. This revision now requires changes to proceed. I feel like this needs further validation. For example, we crash on: int x = __builtin_signbit("1");

Re: [PATCH] D22113: C does not have inline variables

2016-07-14 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/Sema/SemaDecl.cpp:6189-6191 @@ -6188,2 +6188,5 @@ << FixItHint::CreateRemoval(D.getDeclSpec().getInlineSpecLoc()); +} else if (!getLangOpts().CPlusPlus) { + Diag(D.getDeclSpec().getInlineSpecLoc(), diag::err_

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-13 Thread David Majnemer via cfe-commits
majnemer added a comment. Running your patch against the following: struct __declspec(dllimport) S { virtual void f() {} }; S x; constexpr S y; results in: > Global is marked as dllimport, but not external > [2 x i8*]* @"\01??_7S@@6B@" > fatal error: error in backend: Broken mod

Re: r275040 - [CodeGen] Treat imported static local variables as declarations

2016-07-12 Thread David Majnemer via cfe-commits
nt:* Monday, July 11, 2016 9:53 AM > *To:* Robinson, Paul > *Cc:* cfe-commits (cfe-commits@lists.llvm.org) > *Subject:* Re: r275040 - [CodeGen] Treat imported static local variables > as declarations > > > > > > > > On Mon, Jul 11, 2016 at 9:48 AM, Robinson, P

Re: r275040 - [CodeGen] Treat imported static local variables as declarations

2016-07-12 Thread David Majnemer via cfe-commits
; This changes the IR but not the debug-info metadata? > --paulr > > > > The net effect is that the debug-info metadata is not generated for such > static members. > > > > > > -Original Message- > > From: cfe-commits [mailto:cfe-commits-boun...@lists.l

Re: [PATCH] D22273: Treat enumerator_too_large as an extension in MS ABI mode

2016-07-12 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer requested changes to this revision. majnemer added a reviewer: majnemer. majnemer added a comment. This revision now requires changes to proceed. This requires an associated test case. Comment at: lib/Sema/SemaDecl.cpp:14354-14355

r275191 - Fix for the mingw builder

2016-07-12 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue Jul 12 11:56:33 2016 New Revision: 275191 URL: http://llvm.org/viewvc/llvm-project?rev=275191&view=rev Log: Fix for the mingw builder Modified: cfe/trunk/test/CodeGenCXX/mangle-template.cpp Modified: cfe/trunk/test/CodeGenCXX/mangle-template.cpp URL: http://llvm.o

r275190 - [ItaniumMangle] Correctly mangle BuiltinTemplateDecls

2016-07-12 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue Jul 12 11:48:17 2016 New Revision: 275190 URL: http://llvm.org/viewvc/llvm-project?rev=275190&view=rev Log: [ItaniumMangle] Correctly mangle BuiltinTemplateDecls A BuiltinTemplateDecl has no underlying templated decl and as such they cannot be relied upon for mangling.

r275154 - [MS ABI] Support throwing/catching __unaligned types

2016-07-11 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jul 11 23:42:50 2016 New Revision: 275154 URL: http://llvm.org/viewvc/llvm-project?rev=275154&view=rev Log: [MS ABI] Support throwing/catching __unaligned types We need to mark the appropriate bits in ThrowInfo and HandlerType so that the personality routine can correct

Re: [PATCH] D22189: llvm.noalias - Clang CodeGen - check restrict variable map only for restrict-qualified lvalues

2016-07-11 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer accepted this revision. majnemer added a reviewer: majnemer. majnemer added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/CodeGen/CodeGenFunction.h:2725 @@ -2724,3 +2724,3 @@ void EmitStoreOfSc

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread David Majnemer via cfe-commits
now it has two, and the second name is our own invention. (But if > icl also uses that flag, then it's less bad.) > It's not out invention, it's Microsoft's. icl (and now clang-cl) both happen to still support it. If a build system wanted just line t

Re: r275040 - [CodeGen] Treat imported static local variables as declarations

2016-07-11 Thread David Majnemer via cfe-commits
gt; > This changes the IR but not the debug-info metadata? > --paulr > > > > The net effect is that the debug-info metadata is not generated for such > static members. > > > > > > -Original Message- > > From: cfe-commits [mailto:cfe-commits-

r275078 - [Sema] Don't artificially forbid BuiltinTemplateDecls in CheckTemplateArgument

2016-07-11 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jul 11 12:09:56 2016 New Revision: 275078 URL: http://llvm.org/viewvc/llvm-project?rev=275078&view=rev Log: [Sema] Don't artificially forbid BuiltinTemplateDecls in CheckTemplateArgument After thinking about it, we don't really need to forbid BuiltinTemplateDecls explic

Re: r275040 - [CodeGen] Treat imported static local variables as declarations

2016-07-11 Thread David Majnemer via cfe-commits
[mailto:cfe-commits-boun...@lists.llvm.org] On Behalf > Of > > David Majnemer via cfe-commits > > Sent: Sunday, July 10, 2016 9:28 PM > > To: cfe-commits@lists.llvm.org > > Subject: r275040 - [CodeGen] Treat imported static local variables as > > declarations > >

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread David Majnemer via cfe-commits
ms like > a good guideline to me. > Often but not always. For example, we have /Qvec instead of -fvectorize because icl has the flag. > > >> - People who want harmony between Mac OS X, Linux and Windows on the >> driver side can just use clang++. >> >&

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread David Majnemer via cfe-commits
s in a compiler which has never been released. >> >> I'd agree with you if -gline-tables-only had made its way to an actual >> release. >> >> >>> >>> On Mon, Jul 11, 2016 at 10:08 AM, Nico Weber >>> wrote: >>> >>>> This br

Re: r274991 - [clang-cl] Add support for /Zd

2016-07-11 Thread David Majnemer via cfe-commits
agree with you if -gline-tables-only had made its way to an actual release. > > On Mon, Jul 11, 2016 at 10:08 AM, Nico Weber wrote: > >> This breaks existing users of -gline-tables-only. What's the motivation >> for this change? >> > >> On Sat, Jul 9, 201

r275047 - [Sema] Disallow __make_integer_seq from showing up in __make_integer_seq

2016-07-10 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jul 11 00:59:24 2016 New Revision: 275047 URL: http://llvm.org/viewvc/llvm-project?rev=275047&view=rev Log: [Sema] Disallow __make_integer_seq from showing up in __make_integer_seq We hit over stringent asserts when trying to diagnose. Loosen them as appropriate. This

r275040 - [CodeGen] Treat imported static local variables as declarations

2016-07-10 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Jul 10 23:28:21 2016 New Revision: 275040 URL: http://llvm.org/viewvc/llvm-project?rev=275040&view=rev Log: [CodeGen] Treat imported static local variables as declarations Imported variables cannot really be definitions for the purposes of IR generation. Modified:

r274991 - [clang-cl] Add support for /Zd

2016-07-09 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sat Jul 9 16:49:16 2016 New Revision: 274991 URL: http://llvm.org/viewvc/llvm-project?rev=274991&view=rev Log: [clang-cl] Add support for /Zd MASM (ML.exe and ML64.exe) and older versions of MSVC (CL.exe) support a flag called /Zd which is more-or-less -gline-tables-only.

r274984 - [MS ABI] Some code cleanups

2016-07-09 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sat Jul 9 14:26:25 2016 New Revision: 274984 URL: http://llvm.org/viewvc/llvm-project?rev=274984&view=rev Log: [MS ABI] Some code cleanups Don't create unnecessary truncations if the result will not be used. Also prefer preforming math before the truncation, it makes it a

r274983 - [AST] Tighten up some bitfields

2016-07-09 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sat Jul 9 14:26:19 2016 New Revision: 274983 URL: http://llvm.org/viewvc/llvm-project?rev=274983&view=rev Log: [AST] Tighten up some bitfields Optimize the bitfield types to conserve space for the MSVC ABI. Modified: cfe/trunk/include/clang/AST/DeclFriend.h cfe/tr

r274732 - [AST] Use ArrayRef in more interfaces

2016-07-06 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jul 6 23:43:07 2016 New Revision: 274732 URL: http://llvm.org/viewvc/llvm-project?rev=274732&view=rev Log: [AST] Use ArrayRef in more interfaces ArrayRef is a little better than passing around a pointer/length pair. No functional change is intended. Modified: cfe

r274733 - [AST] Tighten up the bitfield in TemplateSpecializationType

2016-07-06 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jul 6 23:43:11 2016 New Revision: 274733 URL: http://llvm.org/viewvc/llvm-project?rev=274733&view=rev Log: [AST] Tighten up the bitfield in TemplateSpecializationType Optimize the bitfield types to conserve space for the MSVC ABI. Modified: cfe/trunk/include/clang

r274677 - [CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage

2016-07-06 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jul 6 16:07:53 2016 New Revision: 274677 URL: http://llvm.org/viewvc/llvm-project?rev=274677&view=rev Log: [CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage For the purpose of emitting debug info, entities with private linkage should be treated the

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. Thinking about this some more, it is possible for clang to emit code that will make everybody happy: If a class is being constructed in a constexpr context and all the vftable entries it references are marked import, emit local vftables and reference them in the objec

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D22034#475540, @DmitryPolukhin wrote: > In http://reviews.llvm.org/D22034#475331, @majnemer wrote: > > > Wait, can you give an example of MSVC exporting a vftable but not all the > > virtual methods (other than the deleting destructor)? I don

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D22034#475002, @DmitryPolukhin wrote: > In http://reviews.llvm.org/D22034#474985, @majnemer wrote: > > > In http://reviews.llvm.org/D22034#474937, @DmitryPolukhin wrote: > > > > > David, do you know real programs that relay on constexpr and dll

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D22034#474937, @DmitryPolukhin wrote: > David, do you know real programs that relay on constexpr and dllexport > semantic that doesn't work on MSVC? Yes, Chrome relied on these semantics. > Anyway current implementation is not compatible wi

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. FWIW, I think that we would be OK to import vftables (and thus use the _7 mangling) in contexts where their construction doesn't need to be constant. It seemed pretty complex to implement but I'd be open to such an implementation. http://reviews.llvm.org/D22034 __

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. Hmm, I'm not so sure this will work with constexpr: #include struct __declspec(dllimport) S { virtual void fn() const {printf("%s\n", "hi");} constexpr S() = default; }; constexpr S s; auto &x = s; int main() { x.fn(); } Before my

r274601 - [AST] Use ArrayRef in more interfaces

2016-07-05 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue Jul 5 23:19:16 2016 New Revision: 274601 URL: http://llvm.org/viewvc/llvm-project?rev=274601&view=rev Log: [AST] Use ArrayRef in more interfaces ArrayRef is a little better than passing around a pointer/length pair. No functional change is intended. Modified: cfe

r274477 - [Sema] A flexible array member must not be the only named member

2016-07-03 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Jul 3 19:24:59 2016 New Revision: 274477 URL: http://llvm.org/viewvc/llvm-project?rev=274477&view=rev Log: [Sema] A flexible array member must not be the only named member We didn't correctly detect situations where a flexible array member was the only named member in

r274475 - [AST] Use ArrayRef in more interfaces

2016-07-03 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Jul 3 16:17:51 2016 New Revision: 274475 URL: http://llvm.org/viewvc/llvm-project?rev=274475&view=rev Log: [AST] Use ArrayRef in more interfaces ArrayRef is a little better than passing around a pointer/length pair. No functional change is intended. Modified: cfe

r274401 - [CodeView] Include MSVC style names for unnamed types

2016-07-01 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Jul 1 18:12:54 2016 New Revision: 274401 URL: http://llvm.org/viewvc/llvm-project?rev=274401&view=rev Log: [CodeView] Include MSVC style names for unnamed types The CodeView printer expects to be able to generate fully qualified names from the debug info graph. This m

Re: [PATCH] D21863: Fix typo in atomic macros

2016-06-29 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer accepted this revision. majnemer added a reviewer: majnemer. majnemer added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D21863 ___ cfe-commits mailing list

r274201 - [CodeView] Implement support for bitfields in Clang

2016-06-29 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jun 29 22:01:59 2016 New Revision: 274201 URL: http://llvm.org/viewvc/llvm-project?rev=274201&view=rev Log: [CodeView] Implement support for bitfields in Clang Emit the underlying storage offset in addition to the starting bit position of the field. This fixes PR28162.

Re: [PATCH] D21783: [CodeView] Implement support for bitfields in Clang

2016-06-29 Thread David Majnemer via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL274201: [CodeView] Implement support for bitfields in Clang (authored by majnemer). Changed prior to commit: http://reviews.llvm.org/D21783?vs=62095&id=62333#toc Repository: rL LLVM http://reviews.l

r274202 - [MS ABI] Pick an inheritance model if we resolve an overload set

2016-06-29 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jun 29 22:02:03 2016 New Revision: 274202 URL: http://llvm.org/viewvc/llvm-project?rev=274202&view=rev Log: [MS ABI] Pick an inheritance model if we resolve an overload set We didn't assign an inheritance model for 'Foo' if the event an exrepssion like '&Foo::Bar' occur

Re: [PATCH] D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation

2016-06-29 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: src/cxa_thread_atexit.cpp:64-90 @@ -18,8 +63,29 @@ +_LIBCXXABI_FUNC_VIS int __cxa_thread_atexit(Dtor dtor, void *obj, void *dso_symbol) throw() { - extern int __cxa_thread_atexit_impl(void (*

Re: [PATCH] D21830: Remove -mrelax-all from Clang -O0

2016-06-29 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. Why are you making this change? I cannot see a justification in the description. http://reviews.llvm.org/D21830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

Re: [PATCH] D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation

2016-06-28 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: src/cxa_thread_atexit.cpp:36-47 @@ +35,14 @@ + public: +DtorListHolder() { + pthread_key_create(&key_, run_dtors); +} + +~DtorListHolder() { + run_dtors(get()); + pthread_key_delete(key_); +} + +

Re: [PATCH] D21783: [CodeView] Implement support for bitfields in Clang

2016-06-28 Thread David Majnemer via cfe-commits
majnemer updated this revision to Diff 62095. majnemer added a comment. - Address review comments http://reviews.llvm.org/D21783 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebugInfo.h test/CodeGen/debug-info-packed-struct.c test/CodeGenCXX/debug-info-ms-bitfields.cpp Index: test/

r273987 - [clang-cl] Define _MSVC_LANG

2016-06-27 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jun 27 22:13:16 2016 New Revision: 273987 URL: http://llvm.org/viewvc/llvm-project?rev=273987&view=rev Log: [clang-cl] Define _MSVC_LANG Recently, Microsoft added support for a flag, /std, which controls which version of the language rules MSVC should use. MSVC hasn't u

r273986 - [intrin.h] Certain _Interlocked intrinsics return the old value

2016-06-27 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jun 27 21:54:43 2016 New Revision: 273986 URL: http://llvm.org/viewvc/llvm-project?rev=273986&view=rev Log: [intrin.h] Certain _Interlocked intrinsics return the old value This fixes PR28326. Modified: cfe/trunk/lib/Headers/intrin.h Modified: cfe/trunk/lib/Headers

[PATCH] D21783: [CodeView] Implement support for bitfields in Clang

2016-06-27 Thread David Majnemer via cfe-commits
majnemer created this revision. majnemer added reviewers: rnk, aaboud. majnemer added a subscriber: cfe-commits. Emit the underlying storage offset in addition to the starting bit position of the field. http://reviews.llvm.org/D21783 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebugInfo

Re: r273950 -

2016-06-27 Thread David Majnemer via cfe-commits
Any tests? On Mon, Jun 27, 2016 at 5:12 PM, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Did you land this intentionally? What was the commit message supposed to > be? > > On Mon, Jun 27, 2016 at 6:11 PM, Chris Dewhurst via cfe-commits < > cfe-commits@lists.llvm.org> wrote: >

Re: [PATCH] D21766: [codeview][clang] Added support for unnamed bitfield type.

2016-06-27 Thread David Majnemer via cfe-commits
majnemer added a comment. As I said in the other differential, I do not think this is the right approach. We should use the extraData for the bitfield member to indicate the offset of the storage unit. http://reviews.llvm.org/D21766 ___ cfe-commits

r273841 - [clang-cl] Implement support for /std

2016-06-26 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Jun 26 21:32:12 2016 New Revision: 273841 URL: http://llvm.org/viewvc/llvm-project?rev=273841&view=rev Log: [clang-cl] Implement support for /std /std: supports two arguments, c++14 and c++latest. Currently, c++latest maps to c++1z but this might change down the road.

r273651 - try to fix the MSVC build

2016-06-23 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Jun 24 00:48:59 2016 New Revision: 273651 URL: http://llvm.org/viewvc/llvm-project?rev=273651&view=rev Log: try to fix the MSVC build Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h URL: http:

r273650 - Use even more ArrayRefs

2016-06-23 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Jun 24 00:33:44 2016 New Revision: 273650 URL: http://llvm.org/viewvc/llvm-project?rev=273650&view=rev Log: Use even more ArrayRefs No functional change is intended, just a small refactoring. Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h cfe/trunk

r273646 - Use the same underlying type for bitfields

2016-06-23 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu Jun 23 23:05:35 2016 New Revision: 273646 URL: http://llvm.org/viewvc/llvm-project?rev=273646&view=rev Log: Use the same underlying type for bitfields MSVC allocates fresh storage for consecutive bitfields with different underlying types. Modified: cfe/trunk/includ

r273647 - Use more ArrayRefs

2016-06-23 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu Jun 23 23:05:48 2016 New Revision: 273647 URL: http://llvm.org/viewvc/llvm-project?rev=273647&view=rev Log: Use more ArrayRefs No functional change is intended, just a small refactoring. Modified: cfe/trunk/include/clang/AST/Decl.h cfe/trunk/include/clang/AST/D

r273522 - Use ranges to concisely express iteration

2016-06-22 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jun 22 19:15:04 2016 New Revision: 273522 URL: http://llvm.org/viewvc/llvm-project?rev=273522&view=rev Log: Use ranges to concisely express iteration No functional change is intended, this should just clean things up a little. Modified: cfe/trunk/include/clang/AST/

r273239 - r273237 fixed PR28220, not PR28216

2016-06-20 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jun 20 22:43:11 2016 New Revision: 273239 URL: http://llvm.org/viewvc/llvm-project?rev=273239&view=rev Log: r273237 fixed PR28220, not PR28216 Added: cfe/trunk/test/CodeGenCXX/PR28220.cpp - copied, changed from r273237, cfe/trunk/test/CodeGenCXX/PR28216.cpp Re

r273237 - [CodeGen] Do not run initializers for imported variables

2016-06-20 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jun 20 22:40:16 2016 New Revision: 273237 URL: http://llvm.org/viewvc/llvm-project?rev=273237&view=rev Log: [CodeGen] Do not run initializers for imported variables The export side is responsible for running any initializers, they are run when the module is first loaded

<    1   2   3   4   5   6   >