[llvm-branch-commits] [clang] release/20.x: [clang-format] Handle C-style cast of member function pointer type (#126340) (PR #126479)
llvmbot wrote: @HazardyKnusperkeks What do you think about merging this PR to the release branch? https://github.com/llvm/llvm-project/pull/126479 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] release/20.x: [clang-format] Handle C-style cast of member function pointer type (#126340) (PR #126479)
https://github.com/llvmbot milestoned https://github.com/llvm/llvm-project/pull/126479 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] release/20.x: [clang-format] Handle C-style cast of member function pointer type (#126340) (PR #126479)
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (llvmbot) Changes Backport 8d373ceaec1f1b27c9e682cfaf71aae19ea48d98 Requested by: @owenca --- Full diff: https://github.com/llvm/llvm-project/pull/126479.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+5-2) - (modified) clang/unittests/Format/TokenAnnotatorTest.cpp (+6) ``diff diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index a172df5291ae62a..4246ade6e19be53 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -477,8 +477,9 @@ class AnnotatingParser { FormatToken *PossibleObjCForInToken = nullptr; while (CurrentToken) { const auto &Prev = *CurrentToken->Previous; + const auto *PrevPrev = Prev.Previous; if (Prev.is(TT_PointerOrReference) && - Prev.Previous->isOneOf(tok::l_paren, tok::coloncolon)) { + PrevPrev->isOneOf(tok::l_paren, tok::coloncolon)) { ProbablyFunctionType = true; } if (CurrentToken->is(tok::comma)) @@ -486,8 +487,10 @@ class AnnotatingParser { if (Prev.is(TT_BinaryOperator)) Contexts.back().IsExpression = true; if (CurrentToken->is(tok::r_paren)) { -if (Prev.is(TT_PointerOrReference) && Prev.Previous == &OpeningParen) +if (Prev.is(TT_PointerOrReference) && +(PrevPrev == &OpeningParen || PrevPrev->is(tok::coloncolon))) { MightBeFunctionType = true; +} if (OpeningParen.isNot(TT_CppCastLParen) && MightBeFunctionType && ProbablyFunctionType && CurrentToken->Next && (CurrentToken->Next->is(tok::l_paren) || diff --git a/clang/unittests/Format/TokenAnnotatorTest.cpp b/clang/unittests/Format/TokenAnnotatorTest.cpp index fc77e277947c563..2147a1b950dd19b 100644 --- a/clang/unittests/Format/TokenAnnotatorTest.cpp +++ b/clang/unittests/Format/TokenAnnotatorTest.cpp @@ -845,6 +845,12 @@ TEST_F(TokenAnnotatorTest, UnderstandsCasts) { EXPECT_TOKEN(Tokens[14], tok::r_paren, TT_CastRParen); EXPECT_TOKEN(Tokens[15], tok::amp, TT_UnaryOperator); + Tokens = annotate("return (Foo (Bar::*)())&Bar::foo;"); + ASSERT_EQ(Tokens.size(), 17u) << Tokens; + EXPECT_TOKEN(Tokens[3], tok::l_paren, TT_FunctionTypeLParen); + EXPECT_TOKEN(Tokens[10], tok::r_paren, TT_CastRParen); + EXPECT_TOKEN(Tokens[11], tok::amp, TT_UnaryOperator); + auto Style = getLLVMStyle(); Style.TypeNames.push_back("Foo"); Tokens = annotate("#define FOO(bar) foo((Foo)&bar)", Style); `` https://github.com/llvm/llvm-project/pull/126479 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] release/20.x: [clang-format] Handle C-style cast of member function pointer type (#126340) (PR #126479)
https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/126479 Backport 8d373ceaec1f1b27c9e682cfaf71aae19ea48d98 Requested by: @owenca >From f293ba32d675c6e1fb11cce5cdb5fedd2565f278 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 8 Feb 2025 23:22:33 -0800 Subject: [PATCH] [clang-format] Handle C-style cast of member function pointer type (#126340) Fixes #125012. (cherry picked from commit 8d373ceaec1f1b27c9e682cfaf71aae19ea48d98) --- clang/lib/Format/TokenAnnotator.cpp | 7 +-- clang/unittests/Format/TokenAnnotatorTest.cpp | 6 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index a172df5291ae62a..4246ade6e19be53 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -477,8 +477,9 @@ class AnnotatingParser { FormatToken *PossibleObjCForInToken = nullptr; while (CurrentToken) { const auto &Prev = *CurrentToken->Previous; + const auto *PrevPrev = Prev.Previous; if (Prev.is(TT_PointerOrReference) && - Prev.Previous->isOneOf(tok::l_paren, tok::coloncolon)) { + PrevPrev->isOneOf(tok::l_paren, tok::coloncolon)) { ProbablyFunctionType = true; } if (CurrentToken->is(tok::comma)) @@ -486,8 +487,10 @@ class AnnotatingParser { if (Prev.is(TT_BinaryOperator)) Contexts.back().IsExpression = true; if (CurrentToken->is(tok::r_paren)) { -if (Prev.is(TT_PointerOrReference) && Prev.Previous == &OpeningParen) +if (Prev.is(TT_PointerOrReference) && +(PrevPrev == &OpeningParen || PrevPrev->is(tok::coloncolon))) { MightBeFunctionType = true; +} if (OpeningParen.isNot(TT_CppCastLParen) && MightBeFunctionType && ProbablyFunctionType && CurrentToken->Next && (CurrentToken->Next->is(tok::l_paren) || diff --git a/clang/unittests/Format/TokenAnnotatorTest.cpp b/clang/unittests/Format/TokenAnnotatorTest.cpp index fc77e277947c563..2147a1b950dd19b 100644 --- a/clang/unittests/Format/TokenAnnotatorTest.cpp +++ b/clang/unittests/Format/TokenAnnotatorTest.cpp @@ -845,6 +845,12 @@ TEST_F(TokenAnnotatorTest, UnderstandsCasts) { EXPECT_TOKEN(Tokens[14], tok::r_paren, TT_CastRParen); EXPECT_TOKEN(Tokens[15], tok::amp, TT_UnaryOperator); + Tokens = annotate("return (Foo (Bar::*)())&Bar::foo;"); + ASSERT_EQ(Tokens.size(), 17u) << Tokens; + EXPECT_TOKEN(Tokens[3], tok::l_paren, TT_FunctionTypeLParen); + EXPECT_TOKEN(Tokens[10], tok::r_paren, TT_CastRParen); + EXPECT_TOKEN(Tokens[11], tok::amp, TT_UnaryOperator); + auto Style = getLLVMStyle(); Style.TypeNames.push_back("Foo"); Tokens = annotate("#define FOO(bar) foo((Foo)&bar)", Style); ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [ELF] Add support for CREL locations for SHT_LLVM_BB_ADDR_MAP (PR #126446)
llvmbot wrote: @llvm/pr-subscribers-llvm-binary-utilities Author: Aiden Grossman (boomanaiden154) Changes This patch adds support for properly decoding SHT_LLVM_BB_ADDR_MAP sections in relocatable object files when the relocation format is CREL. --- Full diff: https://github.com/llvm/llvm-project/pull/126446.diff 2 Files Affected: - (modified) llvm/lib/Object/ELF.cpp (+19-14) - (modified) llvm/test/tools/llvm-readobj/ELF/bb-addr-map-relocatable.test (+56-3) ``diff diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp index 8cb3d7eb141766d..bf42c92a242a160 100644 --- a/llvm/lib/Object/ELF.cpp +++ b/llvm/lib/Object/ELF.cpp @@ -747,20 +747,25 @@ decodeBBAddrMapImpl(const ELFFile &EF, assert(RelaSec && "Can't read a SHT_LLVM_BB_ADDR_MAP section in a relocatable " "object file without providing a relocation section."); -// We might end up with relocations in CREL here. If we do, return an -// error since we do not currently support them. -if (RelaSec->sh_type == ELF::SHT_CREL) - return createError("unable to read relocations for section " + - describe(EF, Sec) + - " as the corresponding relocation section format is " - "CREL, which is not currently supported."); -Expected::Elf_Rela_Range> Relas = EF.relas(*RelaSec); -if (!Relas) - return createError("unable to read relocations for section " + - describe(EF, Sec) + ": " + - toString(Relas.takeError())); -for (typename ELFFile::Elf_Rela Rela : *Relas) - FunctionOffsetTranslations[Rela.r_offset] = Rela.r_addend; +if (RelaSec->sh_type == ELF::SHT_CREL) { + Expected::RelsOrRelas> Relas = EF.crels(*RelaSec); + if (!Relas) +return createError("unable to read CREL relocations for section " + + describe(EF, Sec) + ": " + + toString(Relas.takeError())); + for (typename ELFFile::Elf_Rela Rela : std::get<1>(*Relas)) { +FunctionOffsetTranslations[Rela.r_offset] = Rela.r_addend; + } +} else { + Expected::Elf_Rela_Range> Relas = + EF.relas(*RelaSec); + if (!Relas) +return createError("unable to read relocations for section " + + describe(EF, Sec) + ": " + + toString(Relas.takeError())); + for (typename ELFFile::Elf_Rela Rela : *Relas) +FunctionOffsetTranslations[Rela.r_offset] = Rela.r_addend; +} } auto GetAddressForRelocation = [&](unsigned RelocationOffsetInSection) -> Expected { diff --git a/llvm/test/tools/llvm-readobj/ELF/bb-addr-map-relocatable.test b/llvm/test/tools/llvm-readobj/ELF/bb-addr-map-relocatable.test index e7f78491a94737a..325a956e78591bb 100644 --- a/llvm/test/tools/llvm-readobj/ELF/bb-addr-map-relocatable.test +++ b/llvm/test/tools/llvm-readobj/ELF/bb-addr-map-relocatable.test @@ -1,7 +1,8 @@ ## This test checks how we handle the --bb-addr-map option on relocatable ## object files. -# RUN: yaml2obj %s -o %t1.o +# RUN: yaml2obj -D RELOCATION_SECTION_NAME=.rela.llvm_bb_addr_map \ +# RUN: -D RELOCATION_SECTION_TYPE=SHT_RELA %s -o %t1.o # RUN: llvm-readobj %t1.o --bb-addr-map | FileCheck %s # CHECK: BBAddrMap [ @@ -77,8 +78,8 @@ Sections: AddressOffset: 0x0 Size:0x11 Metadata:0x8 - - Name: .rela.llvm_bb_addr_map -Type: SHT_RELA + - Name: [[RELOCATION_SECTION_NAME]] +Type: [[RELOCATION_SECTION_TYPE]] Flags: [ SHF_INFO_LINK ] Link: .symtab Info: .llvm_bb_addr_map @@ -228,3 +229,55 @@ Sections: # ET-DYN-NO-WARNING: ] # ET-DYN-NO-WARNING: } # ET-DYN-NO-WARNING: ] + +## Check that we can correctly decode a BBAddrMap in a reloctable object file +## with CREL relocations. + +# RUN: yaml2obj -D RELOCATION_SECTION_NAME=.crel.llvm_bb_addr_map \ +# RUN: -D RELOCATION_SECTION_TYPE=SHT_CREL %s -o %t6.o +# RUN: llvm-readobj %t6.o --bb-addr-map | FileCheck %s --check-prefix=CREL + +# CREL: BBAddrMap [ +# CREL-NEXT: Function { +# CREL-NEXT: At: 0x0 +# CREL-NEXT: Name: +# CREL-NEXT: BB Ranges [ +# CREL-NEXT: { +# CREL-NEXT: Base Address: 0x0 +# CREL-NEXT: BB Entries [ +# CREL-NEXT: { +# CREL-NEXT: ID: 0 +# CREL-NEXT: Offset: 0x0 +# CREL-NEXT: Size: 0xF +# CREL-NEXT: HasReturn: Yes +# CREL-NEXT: HasTailCall: No +# CREL-NEXT: IsEHPad: No +# CREL-NEXT: CanFallThrough: No +# CREL-NEXT: HasIndirectBranch: No +# CREL-NEXT: } +# CREL-NEXT: ] +# CREL-NEXT: } +# CREL-NEXT: ] +# CREL-NEXT: } +# CREL-NEXT: Function { +# CREL-NEXT: At: 0x10 +# CREL-NEXT: Name: +# CREL-NEXT: BB Ranges [ +# CREL-NEXT: { +# CREL-NEXT: Base Address: 0x10 +# C
[llvm-branch-commits] [ELF] Add support for CREL locations for SHT_LLVM_BB_ADDR_MAP (PR #126446)
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/126446 This patch adds support for properly decoding SHT_LLVM_BB_ADDR_MAP sections in relocatable object files when the relocation format is CREL. ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [ELF] Add support for CREL locations for SHT_LLVM_BB_ADDR_MAP (PR #126446)
boomanaiden154 wrote: This is a stacked PR on top of #126445. https://github.com/llvm/llvm-project/pull/126446 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] [MC/DC] Create dedicated MCDCCondBitmapAddr for each Decision (PR #125411)
@@ -1245,9 +1245,29 @@ void CodeGenPGO::emitMCDCParameters(CGBuilderTy &Builder) { CGM.getIntrinsic(llvm::Intrinsic::instrprof_mcdc_parameters), Args); } +/// Fill mcdc.addr order by ID. +std::vector +CodeGenPGO::getMCDCCondBitmapAddrArray(CGBuilderTy &Builder) { + std::vector Result; + + if (!canEmitMCDCCoverage(Builder) || !RegionMCDCState) ornata wrote: should we ever call this function if canEmitMCDCCoverage is false? https://github.com/llvm/llvm-project/pull/125411 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] [MC/DC] Create dedicated MCDCCondBitmapAddr for each Decision (PR #125411)
@@ -1245,9 +1245,29 @@ void CodeGenPGO::emitMCDCParameters(CGBuilderTy &Builder) { CGM.getIntrinsic(llvm::Intrinsic::instrprof_mcdc_parameters), Args); } +/// Fill mcdc.addr order by ID. +std::vector +CodeGenPGO::getMCDCCondBitmapAddrArray(CGBuilderTy &Builder) { + std::vector Result; + + if (!canEmitMCDCCoverage(Builder) || !RegionMCDCState) ornata wrote: It seems that many parts of the code already follow this pattern. Therefore, I think I'm fine with this for now. I think it should be cleaned up eventually though. https://github.com/llvm/llvm-project/pull/125411 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] [AMDGPU] Remove dead function metadata after amdgpu-lower-kernel-arguments (PR #126147)
@@ -1,7 +1,7 @@ -; RUN: not --crash opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx940 -passes='amdgpu-attributor,function(amdgpu-lower-kernel-arguments)' -amdgpu-kernarg-preload-count=16 -S < %s 2>&1 | FileCheck %s +; RUN: opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx940 -passes='amdgpu-attributor,function(amdgpu-lower-kernel-arguments)' -amdgpu-kernarg-preload-count=16 -S < %s 2>&1 | FileCheck %s -; CHECK: function declaration may only have a unique !dbg attachment -; CHECK-NEXT: ptr @0 +; CHECK: define amdgpu_kernel void @preload_block_count_x{{.*}} !dbg ![[#]] +; CHECK-NOT: declare void @0{{.*}} !dbg ![[#]] arsenm wrote: I don't think update_test_checks has a way to do this https://github.com/llvm/llvm-project/pull/126147 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] [AMDGPU] Remove dead function metadata after amdgpu-lower-kernel-arguments (PR #126147)
@@ -1,7 +1,7 @@ -; RUN: not --crash opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx940 -passes='amdgpu-attributor,function(amdgpu-lower-kernel-arguments)' -amdgpu-kernarg-preload-count=16 -S < %s 2>&1 | FileCheck %s +; RUN: opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx940 -passes='amdgpu-attributor,function(amdgpu-lower-kernel-arguments)' -amdgpu-kernarg-preload-count=16 -S < %s 2>&1 | FileCheck %s -; CHECK: function declaration may only have a unique !dbg attachment -; CHECK-NEXT: ptr @0 +; CHECK: define amdgpu_kernel void @preload_block_count_x{{.*}} !dbg ![[#]] +; CHECK-NOT: declare void @0{{.*}} !dbg ![[#]] arsenm wrote: I guess you could try adding -implicit-check-not=declare to FileCheck https://github.com/llvm/llvm-project/pull/126147 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] [AMDGPU] Remove dead function metadata after amdgpu-lower-kernel-arguments (PR #126147)
@@ -1,7 +1,7 @@ -; RUN: not --crash opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx940 -passes='amdgpu-attributor,function(amdgpu-lower-kernel-arguments)' -amdgpu-kernarg-preload-count=16 -S < %s 2>&1 | FileCheck %s +; RUN: opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx940 -passes='amdgpu-attributor,function(amdgpu-lower-kernel-arguments)' -amdgpu-kernarg-preload-count=16 -S < %s 2>&1 | FileCheck %s -; CHECK: function declaration may only have a unique !dbg attachment -; CHECK-NEXT: ptr @0 +; CHECK: define amdgpu_kernel void @preload_block_count_x{{.*}} !dbg ![[#]] +; CHECK-NOT: declare void @0{{.*}} !dbg ![[#]] arsenm wrote: Might as well go ahead with this as a temporary step, it at least adds the test https://github.com/llvm/llvm-project/pull/126147 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] release/20.x: [CSKY] Default to unsigned char (PR #126436)
https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/126436 Backport d2047242e6d0f0deb7634ff22ab164354c520c79 Requested by: @arichardson >From 667cb0192d9b32ca15d58ad83285c735d4363f26 Mon Sep 17 00:00:00 2001 From: Alexander Richardson Date: Sun, 9 Feb 2025 12:18:52 -0800 Subject: [PATCH] [CSKY] Default to unsigned char This matches the ABI document found at https://github.com/c-sky/csky-doc/blob/master/C-SKY_V2_CPU_Applications_Binary_Interface_Standards_Manual.pdf Partially addresses https://github.com/llvm/llvm-project/issues/115957 Reviewed By: zixuan-wu Pull Request: https://github.com/llvm/llvm-project/pull/115961 (cherry picked from commit d2047242e6d0f0deb7634ff22ab164354c520c79) --- clang/lib/Driver/ToolChains/Clang.cpp | 1 + clang/test/Driver/csky-toolchain.c| 1 + 2 files changed, 2 insertions(+) diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 589de953be5be1b..49c6d2b271b3812 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -1358,6 +1358,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) { return true; return false; + case llvm::Triple::csky: case llvm::Triple::hexagon: case llvm::Triple::msp430: case llvm::Triple::ppcle: diff --git a/clang/test/Driver/csky-toolchain.c b/clang/test/Driver/csky-toolchain.c index 66485464652ac87..638ce64ec98cde3 100644 --- a/clang/test/Driver/csky-toolchain.c +++ b/clang/test/Driver/csky-toolchain.c @@ -3,6 +3,7 @@ // RUN: %clang -### %s --target=csky 2>&1 | FileCheck -check-prefix=CC1 %s // CC1: "-cc1" "-triple" "csky" +// CC1: "-fno-signed-char" // In the below tests, --rtlib=platform is used so that the driver ignores // the configure-time CLANG_DEFAULT_RTLIB option when choosing the runtime lib ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] release/20.x: [CSKY] Default to unsigned char (PR #126436)
llvmbot wrote: @zixuan-wu What do you think about merging this PR to the release branch? https://github.com/llvm/llvm-project/pull/126436 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] release/20.x: [CSKY] Default to unsigned char (PR #126436)
https://github.com/llvmbot milestoned https://github.com/llvm/llvm-project/pull/126436 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] release/20.x: [CSKY] Default to unsigned char (PR #126436)
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: None (llvmbot) Changes Backport d2047242e6d0f0deb7634ff22ab164354c520c79 Requested by: @arichardson --- Full diff: https://github.com/llvm/llvm-project/pull/126436.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/Clang.cpp (+1) - (modified) clang/test/Driver/csky-toolchain.c (+1) ``diff diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 589de953be5be1b..49c6d2b271b3812 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -1358,6 +1358,7 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) { return true; return false; + case llvm::Triple::csky: case llvm::Triple::hexagon: case llvm::Triple::msp430: case llvm::Triple::ppcle: diff --git a/clang/test/Driver/csky-toolchain.c b/clang/test/Driver/csky-toolchain.c index 66485464652ac87..638ce64ec98cde3 100644 --- a/clang/test/Driver/csky-toolchain.c +++ b/clang/test/Driver/csky-toolchain.c @@ -3,6 +3,7 @@ // RUN: %clang -### %s --target=csky 2>&1 | FileCheck -check-prefix=CC1 %s // CC1: "-cc1" "-triple" "csky" +// CC1: "-fno-signed-char" // In the below tests, --rtlib=platform is used so that the driver ignores // the configure-time CLANG_DEFAULT_RTLIB option when choosing the runtime lib `` https://github.com/llvm/llvm-project/pull/126436 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [ELF] Add support for CREL locations for SHT_LLVM_BB_ADDR_MAP (PR #126446)
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/126446 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] release/20.x: [CSKY] Default to unsigned char (PR #126436)
arichardson wrote: I feel it would make sense to backport this to the release so that Rust built against LLVM20 has a consistent c_char signedness (https://github.com/rust-lang/rust/pull/132975) https://github.com/llvm/llvm-project/pull/126436 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libcxx] [libc++] Make benchmarks dry-run by default on the release branch (PR #126441)
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/126441 As reported in #125510, doing a full run of the benchmarks during release testing breaks for some of the testers, and it also takes a long time. The proper fix would be for the release testing process to call `check-cxx` instead of running lit directly inside libc++'s test directory: that will also have the benefit of actually running all of our tests, not only the Lit ones. However, since that fix may take longer to happen, this patch tries to reduce the pain of release testers by dry-running benchmarks by default instead. >From 0fb2d9d5424f64a0239e21ff569d5b3b696ad2ae Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Sun, 9 Feb 2025 16:45:04 -0500 Subject: [PATCH] [libc++] Make benchmarks dry-run by default on the release branch As reported in #125510, doing a full run of the benchmarks during release testing breaks for some of the testers, and it also takes a long time. The proper fix would be for the release testing process to call `check-cxx` instead of running lit directly inside libc++'s test directory: that will also have the benefit of actually running all of our tests, not only the Lit ones. However, since that fix may take longer to happen, this patch tries to reduce the pain of release testers by dry-running benchmarks by default instead. --- libcxx/utils/libcxx/test/params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py index 8fd3872cd8cbb05..6e13ad75ea94971 100644 --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -371,7 +371,7 @@ def getSuitableClangTidy(cfg): name="enable_benchmarks", choices=["no", "run", "dry-run"], type=str, -default="run", +default="dry-run", help="Whether to run the benchmarks in the test suite, to only dry-run them or to disable them entirely.", actions=lambda mode: [AddFeature(f"enable-benchmarks={mode}")], ), ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libcxx] [libc++] Make benchmarks dry-run by default on the release branch (PR #126441)
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) Changes As reported in #125510, doing a full run of the benchmarks during release testing breaks for some of the testers, and it also takes a long time. The proper fix would be for the release testing process to call `check-cxx` instead of running lit directly inside libc++'s test directory: that will also have the benefit of actually running all of our tests, not only the Lit ones. However, since that fix may take longer to happen, this patch tries to reduce the pain of release testers by dry-running benchmarks by default instead. --- Full diff: https://github.com/llvm/llvm-project/pull/126441.diff 1 Files Affected: - (modified) libcxx/utils/libcxx/test/params.py (+1-1) ``diff diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py index 8fd3872cd8cbb05..6e13ad75ea94971 100644 --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -371,7 +371,7 @@ def getSuitableClangTidy(cfg): name="enable_benchmarks", choices=["no", "run", "dry-run"], type=str, -default="run", +default="dry-run", help="Whether to run the benchmarks in the test suite, to only dry-run them or to disable them entirely.", actions=lambda mode: [AddFeature(f"enable-benchmarks={mode}")], ), `` https://github.com/llvm/llvm-project/pull/126441 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] [AVR] Backport #118015 and #121498 (PR #125081)
Patryk27 wrote: Ah, I see - so the only remaining option is for Zig to apply the patch on its own side, it seems. https://github.com/llvm/llvm-project/pull/125081 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] [AVR] Backport #118015 and #121498 (PR #125081)
nikic wrote: > Ah, that tracks! Is there a timeline for getting rustc to LLVM 20? We've decided to wait for beta branch before merging the LLVM 20 upgrade, so the target is Feb 14. > Not sure what's the next step (can't merge it myself here :-P) - cc @nikic? As the LLVM 20 release cycle has started, there are no plans for further LLVM 19 releases. https://github.com/llvm/llvm-project/pull/125081 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits