https://github.com/vtz created https://github.com/llvm/llvm-project/pull/112714
This patch implements the directive pragma clang section on COFF targets with
the exact same features available on ELF and Mach-O.
>From 02223262c678f02b024b3ce83bb89f08d94815bf Mon Sep 17 00:00:00 2001
From: Vinici
vtz wrote:
Dear @rnk, I believe you're the right one to review this PR. If not, could you
please share the appropriate reviewer?
Thank you very much!
https://github.com/llvm/llvm-project/pull/112714
___
cfe-commits mailing list
cfe-commits@lists.llvm
@@ -1677,6 +1677,22 @@ MCSection
*TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(
Name == getInstrProfSectionName(IPSK_covname, Triple::COFF,
/*AddSegmentInfo=*/false))
Kind = SectionKind::getMetadata();
+
+ const Global
@@ -1677,6 +1677,22 @@ MCSection
*TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(
Name == getInstrProfSectionName(IPSK_covname, Triple::COFF,
/*AddSegmentInfo=*/false))
Kind = SectionKind::getMetadata();
+
+ const Global
@@ -2378,13 +2394,28 @@ MCSection
*TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal(
StringRef SectionName = GO->getSection();
vtz wrote:
The focus was from the beginning on COFF format. We misinterpreted and thought
the XCOFF would be the same way. I
https://github.com/vtz updated https://github.com/llvm/llvm-project/pull/112714
>From e01f6fb36734b214e23cbbe66818b3269d21a591 Mon Sep 17 00:00:00 2001
From: Vinicius Tadeu Zein
Date: Fri, 22 Nov 2024 10:39:08 -0500
Subject: [PATCH] [llvm] Implement pragma clang section on COFF targets
This pat
@@ -1677,6 +1677,22 @@ MCSection
*TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(
Name == getInstrProfSectionName(IPSK_covname, Triple::COFF,
/*AddSegmentInfo=*/false))
Kind = SectionKind::getMetadata();
+
+ const Global
@@ -1677,6 +1677,22 @@ MCSection
*TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(
Name == getInstrProfSectionName(IPSK_covname, Triple::COFF,
/*AddSegmentInfo=*/false))
Kind = SectionKind::getMetadata();
+
+ const Global
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s -triple arm64-windows-msvc
+// expected-no-diagnostics
+#pragma clang section bss = "mybss.1" data = "mydata.1" rodata = "myrodata.1"
text = "mytext.1"
+#pragma clang section bss="" data="" rodata="" text=""
+#pragma cl
vtz wrote:
> This is an LLVM code change, not a clang code change. It's an important
> principle that we test LLVM at the smallest reasonable granularity. Can you
> replace the clang test with an IR test? I'm sure we already have existing IR
> carrying existing sections, we just need to test i
https://github.com/vtz updated https://github.com/llvm/llvm-project/pull/112714
>From 0e36be9b9017c2a258c05a212d353c908c8a5c01 Mon Sep 17 00:00:00 2001
From: Vinicius Tadeu Zein
Date: Mon, 13 Jan 2025 16:15:33 -0500
Subject: [PATCH] [llvm] Implement pragma clang section on COFF targets
This pat
@@ -1,4 +1,5 @@
;RUN: llc -mtriple=armv7-eabi %s -o - | FileCheck %s
+;RUN: llc -mtriple=armv7-msvc %s -o - | FileCheck %s
vtz wrote:
You're right. Improved it.
https://github.com/llvm/llvm-project/pull/112714
___
cfe
vtz wrote:
@efriedma-quic , I guess all your comments were addressed.
https://github.com/llvm/llvm-project/pull/112714
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1684,6 +1676,7 @@ MCSection
*TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(
Name == getInstrProfSectionName(IPSK_covname, Triple::COFF,
/*AddSegmentInfo=*/false))
Kind = SectionKind::getMetadata();
+
@@ -1,4 +1,5 @@
;RUN: llc -mtriple=armv7-eabi %s -o - | FileCheck %s
+;RUN: llc -mtriple=armv7-msvc %s -o - | FileCheck %s
vtz wrote:
Changed to x86. I hope this is fine.
https://github.com/llvm/llvm-project/pull/112714
_
https://github.com/vtz reopened https://github.com/llvm/llvm-project/pull/112714
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vtz updated https://github.com/llvm/llvm-project/pull/112714
>From e186a67261ba51dd59652103d4644a2115063379 Mon Sep 17 00:00:00 2001
From: Vinicius Tadeu Zein
Date: Tue, 14 Jan 2025 14:46:03 -0500
Subject: [PATCH] [llvm] Implement pragma clang section on COFF targets
17 matches
Mail list logo