[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-20 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > ```c > #if !defined(LLVM_BUILD_SHARED_LIBS) > ``` > > is not great but is not too bad. `-DBUILD_SHARED_LIBS=on` modes are slow to > execute tests and are not used often for Release builds. I went ahead and relanded this now, in 538b7ba2aacd6e400ee63c4f9ff1c2543ae69a90, with

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: FWIW this failed for me locally as well but I'm not using `BUILD_SHARED_LIBS`. I am linking with the clang dylib though, which has the same problem I think. https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list c

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-19 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > I hope that we do not drop `LLVM_LIBRARY_VISIBILITY` arbitrarily from > `clang::driver::toolchains::*` classes, just because some unittests need to > reference the symbols in a shared object. That’s a reasonable point. > ```c > #if !defined(LLVM_BUILD_SHARED_LIBS) > ``` > >

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-19 Thread Fangrui Song via cfe-commits
MaskRay wrote: I hope that we do not drop `LLVM_LIBRARY_VISIBILITY` arbitrarily from `clang::driver::toolchains::*` classes, just because some unittests need to reference the symbols in a shared object. ```c #if !defined(LLVM_BUILD_SHARED_LIBS) ``` is not great but is not too bad. `-DBUILD_SH

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-19 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Perhaps this belongs in the ABI-breaking-checks build? Hmm, ideally I think it should be included in any build - let’s hope we don’t need to resort to that. @tstellar @MaskRay Do either of you happen to know about this; would it be ok ABI wise to remove `LLVM_LIBRARY_VISIBIL

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-18 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Perhaps this belongs in the ABI-breaking-checks build? https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-18 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > @tbaederr Just came to report the same thing! > > @mstorsjo This broke builds that use `-DBUILD_SHARED_LIBS=True`. Thanks! That was my guess as well, I was running a build with that enabled to try to reproduce @tbaederr 's issue. > The problem seems to be that the `Generic_G

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-18 Thread Alex Bradbury via cfe-commits
asb wrote: @tbaederr Just came to report the same thing! @mstorsjo This broke builds that use `-DBUILD_SHARED_LIBS=True`. The problem seems to be that the `Generic_GCC` class has the `LLVM_LIBRARY_VISIBILITY` attribute meaning the `clang::driver::toolchains::Generic_GCC::GCCVersion::Parse(llv

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-18 Thread Timm Baeder via cfe-commits
tbaederr wrote: This doesn't build for me locally: ``` mold: error: undefined symbol: tools/clang/unittests/Driver/CMakeFiles/ClangDriverTests.dir/GCCVersionTest.cpp.o: clang::driver::toolchains::Generic_GCC::GCCVersion::Parse(llvm::StringRef) ``` https://github.com/llvm/llvm-project/pull/6907

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-18 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo closed https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-18 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: Thanks, I applied the suggested changes - will push in a little while. https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-18 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo updated https://github.com/llvm/llvm-project/pull/69078 From 1aac071988f66ccab67c7a6179841bb272b5684a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sat, 14 Oct 2023 00:06:05 +0300 Subject: [PATCH] [clang] [unittest] Add a test for Generic_GC

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,48 @@ +//===- unittests/Driver/GCCVersionTest.cpp --- GCCVersion parser tests ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,48 @@ +//===- unittests/Driver/GCCVersionTest.cpp --- GCCVersion parser tests ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,48 @@ +//===- unittests/Driver/GCCVersionTest.cpp --- GCCVersion parser tests ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Martin Storsjö (mstorsjo) Changes This adds actual test cases for all the cases that are listed in a code comment in the implementation of this function; having such test coverage eases doing further modifications to the function.

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-14 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/69078 This adds actual test cases for all the cases that are listed in a code comment in the implementation of this function; having such test coverage eases doing further modifications to the function. From 2b1272