[PATCH] D79995: [clang] [MinGW] Fix libunwind extension

2020-05-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D79995#2054298 , @mati865 wrote: > @mstorsjo @rnk will be away since June Yeah, I've noticed - but was waiting to see if he'd comment on it before that. Btw, would it be possible to add some test for this? (Sorry for not men

[PATCH] D79117: [clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch names

2020-05-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a reviewer: rjmccall. mstorsjo added a comment. Adding some more Apple reviewers on this one - who can give it a look? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79117/new/ https://reviews.llvm.org/D79117 __

[PATCH] D80492: Avoid linking libdl unless needed

2020-05-28 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0073c293a401: [clang] Avoid linking libdl unless needed (authored by thieta, committed by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80492/new/

[PATCH] D79995: [clang] [MinGW] Fix libunwind extension

2020-05-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. LGTM now - thanks! What's your preferred git author line for this project? I can probably push it tomorrow. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79995/new/ https://revie

[PATCH] D79995: [clang] [MinGW] Fix libunwind extension

2020-05-29 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGab4d02cf2659: [clang] [MinGW] Fix libunwind extension (authored by mati865, committed by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79995/new/

[PATCH] D79117: [clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch names

2020-05-29 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac1f7ab007e3: [clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch… (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt

2020-05-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: jacek, mati865, amccarth, rnk. Herald added a project: clang. The msvcrt library isn't a pure import library; it does contain regular object files with wrappers/fallbacks, and these can require linking against kernel32. This only makes a

[PATCH] D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt

2020-06-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80880#2066078 , @mati865 wrote: > Wouldn't it better fit in `AddLibGCC`? `AddLibGCC` is called twice, and we already add `-lkernel32` (plus a bunch of other libraries) after the first invocation, so that would either add an

[PATCH] D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt

2020-06-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80880#2066130 , @mati865 wrote: > I don't know why `AddLibGCC` has to be called twice but that doesn't really > matter for this diff. From the clang perspective, I guess it's to match GCC. Originally, I guess the reason is

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80876#2067532 , @rnk wrote: > This seems wrong for mingw, so check with @mstorsjo. Thanks for the headsup! I agree that this change would make sense and would make things more consistent in general, but @rnk is also right

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80876#2068428 , @mstorsjo wrote: > But as for keeping the old default in mingw environments, would it make sense > to, if on windows, check the default target triple, and if that's a mingw > target (`Triple.isWindowsGNUEnvir

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a subscriber: mati865. mstorsjo added a comment. In D80876#2069418 , @sbc100 wrote: > If we want want to have the default on windows be dependent on mingw vs > not-mingw then we should do it across the board so it applies to llvm-ar, > lld

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80876#2069970 , @sbc100 wrote: > Do you know how gcc handles this case when running on mingw? It uses the gnu/unix quoting style - so that's the case for wanting clang to preserve compatibility with that behaviour. The fac

[PATCH] D81385: Fix libdl linking for libclang in standalone mode

2020-07-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a subscriber: hans. mstorsjo added a comment. Ping @beanz @hans - I think this is something that would be wanted to have fixed in the release branch (it's a regression for certain build configurations, afaik) - the fix awaits an ack from @beanz. Repository: rG LLVM Github Mon

[PATCH] D81385: Fix libdl linking for libclang in standalone mode

2020-07-23 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa41af6e41e6f: [clang] Fix libdl linking for libclang in standalone mode (authored by thieta, committed by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D76038: PR45000: Use Sema::SetParamDefaultArgument in TransformLambdaExpr

2020-04-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping - any update on this one? Are you waiting on @rsmith for input on where to place a testcase? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76038/new/ https://reviews.llvm.org/D76038 ___

[PATCH] D78162: [CodeGen] Mark inline definitions of builtins as nobuiltin only if we plan to emit them.

2020-04-16 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. This triggers failed asserts: $ cat dcpdecrypt.cpp extern "C" __inline__ __attribute__((__gnu_inline__)) void * memcpy(void *, const void *, unsigned) {} void *memcpy(void *, const void *, unsigned); void a() { memcpy; } $ clang++ -c dcpdecrypt.cpp -target i6

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80876#2071997 , @sbc100 wrote: > In D80876#2070233 , @mstorsjo wrote: > > > In D80876#2069970 , @sbc100 wrote: > > > > > Do you know how gcc han

[PATCH] D81794: [clang] Don't emit warn_cxx_ms_struct when MSBitfields is enabled globally

2020-06-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rjmccall, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. This diagnostic (which defaults to an error, added in 95833f33bda6c92e746e0b0007b69c2c30bfc693) was (as far as I can see) intended to clearly point out

[PATCH] D81795: [clang] Enable -mms-bitfields by default for mingw targets

2020-06-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rjmccall, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. This matches GCC, which enabled -mms-bitfields by default for mingw targets in 4.7 [1]. [1] https://www.gnu.org/software/gcc/gcc-4.7/changes.html Repo

[PATCH] D81794: [clang] Don't emit warn_cxx_ms_struct when MSBitfields is enabled globally

2020-06-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 270587. mstorsjo added a comment. Fixed the formatting CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81794/new/ https://reviews.llvm.org/D81794 Files: clang/lib/Sema/SemaDeclCXX.cpp clang/test/SemaCXX/ms_struct.cpp Index: clang/test/SemaCXX/

[PATCH] D81795: [clang] Enable -mms-bitfields by default for mingw targets

2020-06-15 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D81795#2092878 , @rjmccall wrote: > Seems reasonable; GCC is the "system compiler" for this platform. Does > `isWindowsGNUEnvironment` exactly track the condition that GCC uses? It's > just MinGW, not Cygwin? Yes: https

[PATCH] D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt

2020-06-16 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80880#2066938 , @amccarth wrote: > Yowza. Mingw still links against MSVCRT?! Sorry, I missed this comment earlier - that I see that I want to reply to. Traditionally, mingw still links against the OS private msvcrt.dll yes

[PATCH] D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt

2020-06-16 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbeeed368b602: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8088

[PATCH] D81794: [clang] Don't emit warn_cxx_ms_struct when MSBitfields is enabled globally

2020-06-16 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7b3fe9699277: [clang] Don't emit warn_cxx_ms_struct when MSBitfields is enabled globally (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D81795: [clang] Enable -mms-bitfields by default for mingw targets

2020-06-16 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe3fd9dc9734c: [clang] Enable -mms-bitfields by default for mingw targets (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81795/new/ ht

[PATCH] D81385: Fix libdl linking for libclang in standalone mode

2020-07-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping @beanz - I think people would like this to be included before the 11 branch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81385/new/ https://reviews.llvm.org/D81385 ___

[PATCH] D75068: libclang: Add static build support for Windows

2020-04-25 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6fb80d9383e4: libclang: Add static build support for Windows (authored by cristian.adam, committed by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D78508: [Clang] Allow long as size_t printf argument on 32-bit Windows platforms.

2020-04-27 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping, @rnk? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78508/new/ https://reviews.llvm.org/D78508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D79076: [clang] [MinGW] Add the compiler rt libdirs to the search path

2020-04-29 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rnk, hans. Herald added a project: clang. This matches what is done for MSVC in b8000c0ce84541c5b5535419234fb65ce77d6756 . Since that commit, compiler rt sanitizer libra

[PATCH] D79076: [clang] [MinGW] Add the compiler rt libdirs to the search path

2020-04-29 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa0e53de472c5: [clang] [MinGW] Add the compiler rt libdirs to the search path (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79076/new/

[PATCH] D79117: [clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch names

2020-04-29 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: t.p.northover. Herald added subscribers: danielkiss, kristof.beyls. Herald added a project: clang. These are mapped in MachO::getMachOArchName already, but were missing in ToolChain::getDefaultUniversalArchName. Having these reverse mapp

[PATCH] D79694: [tests][Driver] Set `--sysroot=""` to allow `DEFAULT_SYSROOT` build

2020-05-10 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79694/new/ https://reviews.llvm.org/D79694 ___

[PATCH] D79852: [libunwind] Fix wrong endianness check in Unwind-EHABI

2020-05-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79852/new/ https://reviews.llvm.org/D79852 ___

[PATCH] D79117: [clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch names

2020-05-14 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping @t.p.northover Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79117/new/ https://reviews.llvm.org/D79117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D79995: [clang] [MinGW] Fix libunwind extension

2020-05-15 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a reviewer: rnk. mstorsjo added a subscriber: rnk. mstorsjo added a comment. So, using `-l:libunwind.dll.a` is definitely more correct than `-l:libunwind.so` on this platform, so in that sense this is good. In my toolchains I don't use this option at all so far, because I have li

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-22 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. LGTM, thanks for updating it! https://reviews.llvm.org/D40181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-22 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. Looks really good to me now! @rnk? Repository: rL LLVM https://reviews.llvm.org/D39673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-23 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318902: Allow to set locale on Windows. (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D40181?vs=123923&id=124055#toc Repository: rL LLVM https://reviews.llvm.org/D40181

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Driver/ToolChain.cpp:458 +if (Triple.getArch() == llvm::Triple::x86) + return llvm::ExceptionHandling::DwarfCFI; +else I'd suggest braces around the outer if statement. But is there any point to this d

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChain.cpp:457 + if (Triple.isOSWindows()) +return llvm::ExceptionHandling::WinEH; + return llvm::ExceptionHandling::None; It looks like this broke some buildbot after all - see e.g. http:

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChains/FreeBSD.cpp:368 +getTriple().getArch() == llvm::Triple::thumb) + return llvm::ExceptionHandling::SjLj; case llvm::Triple::GNUEABIHF: This seems to need a fallthrough comme

[PATCH] D132661: [clang] Make guard(nocf) attribute available only for Windows

2022-08-29 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG00d648bdb5a8: [clang] Make guard(nocf) attribute available only for Windows (authored by alvinhochun, committed by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D132661?vs=455820&id=45628

[PATCH] D132810: [clang][MinGW] Add `-mguard=cf` and `-mguard=cf-nochecks`

2022-08-29 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Looks reasonable to me, but I'd appreciate input from people more familiar with adding new options to the GCC style driver about option naming. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132810/new/ https://reviews.llv

[PATCH] D132848: [clang] Fix checking for emulated TLS in shouldAssumeDSOLocal in CodeGen

2022-08-29 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: aaron.ballman. Herald added a project: All. mstorsjo requested review of this revision. Herald added a project: clang. We shouldn't just check the clang options, we also should check `Triple::hasDefaultEmulatedTLS()`. This doesn't make an

[PATCH] D132916: [clang] Explicitly set the EmulatedTLS codegen option

2022-08-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: aaron.ballman, rjmccall, efriedma. Herald added a subscriber: ormris. Herald added a project: All. mstorsjo requested review of this revision. Herald added a project: clang. Set the EmulatedTLS option based on `Triple::hasDefaultEmulatedTLS

[PATCH] D132920: [clang] Silence a false positive GCC -Wunused-but-set-parameter warning with constexpr

2022-08-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: bkramer. Herald added a project: All. mstorsjo requested review of this revision. Herald added a project: clang. This fixes the following warning: In file included from ../tools/clang/lib/Tooling/Transformer/Transformer.cpp:9: ../too

[PATCH] D132920: [clang] Silence a false positive GCC -Wunused-but-set-parameter warning with constexpr

2022-08-31 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGce4c7a987fa3: [clang] Silence a false positive GCC -Wunused-but-set-parameter warning with… (authored by mstorsjo). Repository: rG LLVM Github Mon

[PATCH] D132810: [clang][MinGW] Add `-mguard=cf` and `-mguard=cf-nochecks`

2022-09-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D132810#3756000 , @rnk wrote: > +@maskray, should we use `-mguard=` as the GCC spelling of the MSVC `/GUARD:` > flag? Short flags are nice, but it seems there may be a risk of GCC using > `-mguard=` for something else at som

[PATCH] D133180: [MinGW] Ignore -fvisibility/-fvisibility-inlines-hidden for dllexport

2022-09-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. This LGTM, but one question about the test. Thanks! Comment at: clang/test/CodeGenCXX/dllstorage-hidden.cpp:3 + +// RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-exten

[PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-09-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. FYI, this change broke Wine (at least on arm and aarch64). Not saying that it is legit breakage of code that actually was UB to begin with though - it's going to take some time to figure out what's broken though. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D133249: [libc++] Documents details of the pre-commit CI.

2022-09-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/www/hacking.html:302 + + For most builds, the pre-commit CI uses a recent + https://apt.llvm.org/";>nightly build of Clang from LLVM's main I'm wondering if there's a better synonym for "builds" here which would

[PATCH] D133266: [MinGW] Reject explicit non-default visibility applied to dllexport/dllimport declaration

2022-09-05 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1104 if (GV->hasLocalLinkage()) { GV->setVisibility(llvm::GlobalValue::DefaultVisibility); retu

[PATCH] D133249: [libc++] Documents details of the pre-commit CI.

2022-09-05 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: libcxx/docs/Contributing.rst:119 + +Unless specified otherwise the ``main`` version of Clang is used. + Mordante wrote: > mstorsjo wrote: > > I don't understand this paragraph - each CI run is run through the > > confi

[PATCH] D132916: [clang] Explicitly set the EmulatedTLS codegen option

2022-09-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. @efriedma Does this look like what you had in mind; does it seem reasonable to @aaron.ballman? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132916/new/ https://reviews.llvm.org/D132916 __

[PATCH] D132810: [clang][MinGW] Add `-mguard=cf` and `-mguard=cf-nochecks`

2022-09-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/test/Driver/mingw-cfguard.c:1 +// RUN: %clang -v -target x86_64-w64-windows-gnu -### %s 2>&1 | FileCheck -check-prefixes=NO_CF,DEFAULT %s +// RUN: %clang -v -target x86_64-w64-windows-gnu -### %s -mguard=none 2>&1 | FileCheck -c

[PATCH] D132810: [clang][MinGW] Add `-mguard=cf` and `-mguard=cf-nochecks`

2022-09-08 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa3a8bd00c8f1: [clang][MinGW] Add `-mguard=cf` and `-mguard=cf-nochecks` (authored by alvinhochun, committed by mstorsjo). Repository: rG LLVM Gith

[PATCH] D132916: [clang] Explicitly set the EmulatedTLS codegen option

2022-09-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D132916#3781108 , @aaron.ballman wrote: > In D132916#3773791 , @mstorsjo > wrote: > >> @efriedma Does this look like what you had in mind; does it seem reasonable >> to @aaron.ballm

[PATCH] D133249: [libc++] Documents details of the pre-commit CI.

2022-09-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: libcxx/docs/Contributing.rst:119 + +Unless specified otherwise the ``main`` version of Clang is used. + Mordante wrote: > aaron.ballman wrote: > > mstorsjo wrote: > > > Mordante wrote: > > > > mstorsjo wrote: > > > > >

[PATCH] D132916: [clang] Explicitly set the EmulatedTLS codegen option

2022-09-13 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGfbfe1db4a95a: [clang] Explicitly set the EmulatedTLS codegen option. NFC. (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D132848: [clang] Fix checking for emulated TLS in shouldAssumeDSOLocal in CodeGen

2022-09-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo abandoned this revision. mstorsjo added a comment. Abandoned in favour of D132916 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132848/new/ https://reviews.llvm.org/D132848 _

[PATCH] D133773: [clang] fix linker executable path in test

2022-09-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D133773#3786484 , @alvinhochun wrote: > Ah sorry about that, I didn't realize the command includes `.exe` on Windows. > (For the record, `ld"` matches both `ld` and `ld.lld`.) No, iirc these quotes are checked as literal pa

[PATCH] D133773: [clang] fix linker executable path in test

2022-09-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D133773#3786611 , @alvinhochun wrote: > In D133773#3786602 , @mstorsjo > wrote: > >> In D133773#3786484 , @alvinhochun >> wrote: >> >>> Ah

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-09-14 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6546 + if (Triple.isOSWindows() && !D.IsCLMode()) +ProcessVSRuntimeLibrary(Args, CmdArgs); Should this be `Triple.isWindowsMSVCEnvironment()`? We don't want to do this at le

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-09-14 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. LGTM from my perspective now too. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4493 + + if (Args.hasArg(options::OPT__SLASH_Zl)) { +CmdArgs.push_back("-D_VC_NODEFAULTLIB"); If I understand correctly, we still don't have any c

[PATCH] D109621: [clang][Driver] Default to loading clang.cfg if config file not specified

2022-09-15 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. On this topic, it would be great if we could pick up a per-target default config file too, if clang is invoked with `clang -target `. Currently this is done automatically if clang is invoked as `-clang`, but not with an explicit `-target` parameter. CHANGES SINCE LAS

[PATCH] D133959: Add clang flag equivalent to clang-cl /Zl flag

2022-09-15 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/include/clang/Driver/Options.td: dll version.}]>; +def fms_omit_default_lib_name : Joined<["-"], "fms-omit-default-lib-name">, + Group, Flags<[NoXarchOption, CoreOption]>, Initially, I'm not entirely sure ab

[PATCH] D128927: [libc++] Always build c++experimental.a

2022-07-05 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D128927#3622793 , @ldionne wrote: > @mstorsjo I might need some assistance figuring out what to do with the > Windows parts of this change. I can try to have a look in a couple days or so - I'm vacationing and have been tra

[PATCH] D111081: [clang] [MinGW] Fix paths on Gentoo

2022-07-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. LGTM, thanks, and sorry for losing track of it earlier. Do you need someone to push the patch for you? In that case, can you provide your preferred git author line for the patch? CHANGES

[PATCH] D129277: [clang] [Serialization] Fix swapped PPOpts/ExistingPPOpts parameters. NFC.

2022-07-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: aaron.ballman, rnk, shafik. Herald added a project: All. mstorsjo requested review of this revision. Herald added a project: clang. The two first parameters of checkPreprocessorOptions are "PPOpts, ExistingPPOpts". All other callers of the

[PATCH] D129277: [clang] [Serialization] Fix swapped PPOpts/ExistingPPOpts parameters. NFC.

2022-07-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D129277#3636567 , @aaron.ballman wrote: > Thanks for catching this! Is it really an NFC change though (it seems like it > would change some of the diagnostic behavior and the list of suggested > predefines)? Can you add tes

[PATCH] D128927: [libc++] Always build c++experimental.a

2022-07-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. It looks like the tests would work in CI in the clang-cl configurations with this modification: diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot index 65155ba173ed..407e93ef1575 100755 --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils

[PATCH] D111081: [clang] [MinGW] Fix paths on Gentoo

2022-07-07 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8e218026f8d5: [clang] [MinGW] Fix paths on Gentoo (authored by maharmstone, committed by mstorsjo). Herald added a project: clang. Repository: rG

[PATCH] D129277: [clang] [Serialization] Fix swapped PPOpts/ExistingPPOpts parameters. NFC.

2022-07-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D129277#3636795 , @aaron.ballman wrote: > In D129277#3636596 , @mstorsjo > wrote: > >> In D129277#3636567 , >> @aaron.ballman wrote: >> >>>

[PATCH] D129277: [clang] [Serialization] Fix swapped PPOpts/ExistingPPOpts parameters. NFC.

2022-07-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 443075. mstorsjo added a comment. Add `/*Diags=*/nullptr` for clarity, as suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129277/new/ https://reviews.llvm.org/D129277 Files: clang/lib/Serialization

[PATCH] D128927: [libc++] Always build c++experimental.a

2022-07-08 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D128927#3638973 , @ldionne wrote: > Thanks @mstorsjo! Regarding `_LIBCPP_EXPERIMENTAL_FUNC_VIS`, yes I think it > would make sense to use a different visibility macro for symbols that we know > are provided only as part of a

[PATCH] D129277: [clang] [Serialization] Fix swapped PPOpts/ExistingPPOpts parameters. NFC.

2022-07-08 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb069801ffb6d: [clang] [Serialization] Fix swapped PPOpts/ExistingPPOpts parameters. NFC. (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D126676: [clang] Disallow differences in defines used for creating and using PCH

2022-07-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 443461. mstorsjo added a comment. Reduce the scope and impact of the change: When telling Clang to include a specifically named PCH file, keep tolerating the same set of mismatches as before. (Clang has been tolerating such differences for over 10 years, an

[PATCH] D121873: [clang][extract-api] Add enum support

2022-03-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. This (or some closely related commit?) causes a huge amount of warnings when building with GCC: warning: ‘clang::extractapi::EnumRecord’ has a field ‘clang::extractapi::EnumRecord::Constants’ whose type uses the anonymous namespace [-Wsubobject-linkage] 167 | str

[PATCH] D121687: [clang-tidy] Don't try to build CTTestTidyModule for Windows with dylibs

2022-03-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang-tools-extra/test/CMakeLists.txt:84 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - llvm_add_library( - CTTestTidyModule - MODULE clang-tidy/CTTestTidyModule.cpp - PLUGIN_TOOL clang-tidy - DEPENDS clang-tidy-headers) +

[PATCH] D122766: [clang] Use forward slash as the path separator for Windows in __FILE__, __builtin_FILE(), and std::source_location

2022-03-31 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. > When targeting Windows, the path separator used when targeting Windows > depends on the build environment when Clang _itself_ is built. This leads to > inconsistencies in Chrome builds where Clang running on non-Windows > environments uses the forward slash (/) path

[PATCH] D122766: [clang] Use forward slash as the path separator for Windows in __FILE__, __builtin_FILE(), and std::source_location

2022-03-31 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D122766#3420925 , @thakis wrote: > Windows can handle slashes, but several tools can't. I worry that if we do > something different than cl, some random corner case might break (dbghelp, or > some source server thing or some

[PATCH] D129799: [clang-tidy] Add CLANG_MAKE_CONFUSABLE_TABLE cmake cache variable to avoid building when cross compiling

2022-07-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping @serge-sans-paille @sammccall - does this seem reasonable, and would you like to tweak the name of the tool before cementing it into a public cmake option (that at least I would be setting while cross compiling)? Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D129799: [clang-tidy] Add CLANG_MAKE_CONFUSABLE_TABLE cmake cache variable to avoid building when cross compiling

2022-07-27 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D129799#3681524 , @sammccall wrote: > I'd be tempted by `clang-tidy-confusable-chars-gen` or so but I'm really just > painting the bikeshed at this point - up to you. That sounds like a clearer name to me, thanks! I’ll updat

[PATCH] D129798: [clang-tidy] Add a "clang-" namespace prefix to the make-confusable-target executable

2022-07-27 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 448162. mstorsjo added a comment. Updated with the new suggested executable name from https://reviews.llvm.org/D129799#3681524. Will push this change tomorrow if there's no further objections. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D129799: [clang-tidy] Add CLANG_MAKE_CONFUSABLE_TABLE cmake cache variable to avoid building when cross compiling

2022-07-27 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 448163. mstorsjo added a comment. Updated with the new tool name, and renamed the cmake variable accordingly Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129799/new/ https://reviews.llvm.org/D129799 Files:

[PATCH] D129798: [clang-tidy] Rename the make-confusable-table executable

2022-07-28 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG18b4a8bcf355: [clang-tidy] Rename the make-confusable-table executable (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D129799: [clang-tidy] Add CLANG_TIDY_CONFUSABLE_CHARS_GEN cmake setting to avoid building when cross compiling

2022-07-28 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdc95d0c52563: [clang-tidy] Add CLANG_TIDY_CONFUSABLE_CHARS_GEN cmake cache variable to avoid… (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D129798: [clang-tidy] Rename the make-confusable-table executable

2022-07-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/CMakeLists.txt:10 else() - set(make_confusable_table $) - set(make_confusable_table_target make-confusable-table) + set(make_confusable_table $) + set(make_confusable_table_target clang-tidy-confus

[PATCH] D130701: [clang-tidy] Rename a local cmake variables to match the new tool name. NFC.

2022-07-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: sammccall. Herald added subscribers: carlosgalvezp, xazax.hun, mgorny. Herald added a project: All. mstorsjo requested review of this revision. Herald added a project: clang-tools-extra. This shouldn't have any externally visible effect.

[PATCH] D126676: [clang] Disallow differences in defines used for creating and using PCH

2022-07-29 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping @vsapsai @Bigcheese @akyrtzi @benlangmuir @arphaman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126676/new/ https://reviews.llvm.org/D126676 ___ cfe-commits mailing list

[PATCH] D126676: [clang] Disallow differences in defines used for creating and using PCH

2022-07-29 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D126676#3687227 , @dexonsmith wrote: > I haven’t reviewed the details of the patch and won’t have time to do so (at > least for a while), but the description of the intended (more narrow) scope > SGTM. With the scope limite

[PATCH] D129798: [clang-tidy] Rename the make-confusable-table executable

2022-07-29 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/ConfusableTable/BUILD.gn:1 -executable("make-confusable-table") { +executable("clang-tidy-confusable-chars-gen") { deps = [ "//llvm/lib/Support" ] thakis wro

[PATCH] D126676: [clang] Disallow differences in defines used for creating and using PCH

2022-07-29 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 448708. mstorsjo added a comment. Update the parameters to the internal `checkPreprocessorOptions` function to use a three-state enum instead of having two separate `bool` flags. The 15.x release already has been branched, but I'd like to have this backpor

[PATCH] D129799: [clang-tidy] Add CLANG_TIDY_CONFUSABLE_CHARS_GEN cmake setting to avoid building when cross compiling

2022-07-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D129799#3689044 , @trcrsired wrote: > Hi i have a question. Does llvm provide a general toggle to set all those > things with a directory? It becomes unmanagable since the end of llvm 15 for > Canadian compilation. > > like

[PATCH] D130701: [clang-tidy] Rename a local cmake variables to match the new tool name. NFC.

2022-08-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping @sammccall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130701/new/ https://reviews.llvm.org/D130701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D130969: [clang] [HLSL] Fix GCC warnings about virtual methods that are hidden

2022-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: beanz. Herald added a subscriber: Anastasia. Herald added a project: All. mstorsjo requested review of this revision. Herald added a project: clang. This fixes the following warnings produced by GCC 9: [...] Building CXX object tools/clan

[PATCH] D131052: [CMake] Allow setting the location of host tools with LLVM_NATIVE_TOOL_DIR

2022-08-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: sammccall, tstellar, smeenai, beanz. Herald added subscribers: carlosgalvezp, mgorny. Herald added a project: All. mstorsjo requested review of this revision. Herald added projects: LLVM, clang-tools-extra. Herald added a subscriber: cfe-com

[PATCH] D126676: [clang] Disallow differences in defines used for creating and using PCH

2022-08-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. @rnk Can you have another look here? There doesn’t really seem to be anyone else who’s able to give it a review at the moment, but @dexonsmith seemed ok with the idea. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126676/

[PATCH] D126676: [clang] Disallow differences in defines used for creating and using PCH

2022-08-05 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D126676#3703024 , @jansvoboda11 wrote: > Do you think it would make sense to introduce a command-line flag that would > control this behavior? Hmm - I don’t think it’d be necessary. If using the gcc style PCH directory, I

<    1   2   3   4   5   6   7   8   9   10   >