Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MC: Use reportFatalUsageError for COFF with non-windows#147911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

arsenm
Copy link
Contributor

No description provided.

@arsenmarsenm requested a review fromMaskRayJuly 10, 2025 07:55
@arsenmarsenm marked this pull request as ready for reviewJuly 10, 2025 07:55
@arsenmGraphite App
Copy link
ContributorAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@llvmbotllvmbot added backend:AArch64 mcMachine (object) code labelsJul 10, 2025
@llvmbot
Copy link
Member

llvmbot commentedJul 10, 2025
edited
Loading

@llvm/pr-subscribers-mc

@llvm/pr-subscribers-backend-aarch64

Author: Matt Arsenault (arsenm)

Changes

Full diff:https://github.com/llvm/llvm-project/pull/147911.diff

2 Files Affected:

  • (modified) llvm/lib/MC/MCContext.cpp (+4-3)
  • (added) llvm/test/CodeGen/AArch64/nonwindows-coff-mc-error.ll (+5)
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cppindex b0d1cb41fac1c..890184db1d1ef 100644--- a/llvm/lib/MC/MCContext.cpp+++ b/llvm/lib/MC/MCContext.cpp@@ -87,9 +87,10 @@ MCContext::MCContext(const Triple &TheTriple, const MCAsmInfo *mai,     Env = IsMachO;     break;   case Triple::COFF:-    if (!TheTriple.isOSWindows() && !TheTriple.isUEFI())-      report_fatal_error(-          "Cannot initialize MC for non-Windows COFF object files.");+    if (!TheTriple.isOSWindows() && !TheTriple.isUEFI()) {+      reportFatalUsageError(+          "cannot initialize MC for non-Windows COFF object files");+    }      Env = IsCOFF;     break;diff --git a/llvm/test/CodeGen/AArch64/nonwindows-coff-mc-error.ll b/llvm/test/CodeGen/AArch64/nonwindows-coff-mc-error.llnew file mode 100644index 0000000000000..3e89cac7570a8--- /dev/null+++ b/llvm/test/CodeGen/AArch64/nonwindows-coff-mc-error.ll@@ -0,0 +1,5 @@+; RUN: not llc -mtriple=aarch64-unknown-linux-coff -filetype=null %s 2>&1 | FileCheck %s+; CHECK: LLVM ERROR: cannot initialize MC for non-Windows COFF object files+define void @foo() {+  ret void+}

@arsenm
Copy link
ContributorAuthor

ping

@arsenmarsenmforce-pushed theusers/arsenm/mc/use-reportFatalUsageError-coff-nonwindows branch from8940960 to5f06735CompareJuly 15, 2025 06:37
@arsenmarsenm merged commit16798ee intomainJul 15, 2025
8 of 9 checks passed
@arsenmarsenm deleted the users/arsenm/mc/use-reportFatalUsageError-coff-nonwindows branchJuly 15, 2025 07:27
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@MaskRayMaskRayMaskRay approved these changes

Assignees
No one assigned
Labels
backend:AArch64mcMachine (object) code
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@arsenm@llvmbot@MaskRay

[8]ページ先頭

©2009-2025 Movatter.jp