[llvm] [llvm][llc] Remove unneeded Arg for GetOutputStream (PR #100087)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 02:19:02 PDT 2024


https://github.com/sugarfillet created https://github.com/llvm/llvm-project/pull/100087

The "TargetName" is not used in the GetOutputStream() function, so remove it and its respective argument.

>From 39554a6ebdf8be9cfbc917aa9ad11a32004dbbb2 Mon Sep 17 00:00:00 2001
From: sugarfillet <18705174754 at 163.com>
Date: Tue, 23 Jul 2024 09:16:07 +0000
Subject: [PATCH] [llvm][llc] Remove unneeded Arg for GetOutputStream

The "TargetName" is not used in the GetOutputStream() function, so remove it and its respective argument.
---
 llvm/tools/llc/llc.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index e7bf192192b67..ba75056701b09 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -255,8 +255,7 @@ static int compileModule(char **, LLVMContext &);
   llvm_unreachable("reportError() should not return");
 }
 
-static std::unique_ptr<ToolOutputFile> GetOutputStream(const char *TargetName,
-                                                       Triple::OSType OS,
+static std::unique_ptr<ToolOutputFile> GetOutputStream(Triple::OSType OS,
                                                        const char *ProgName) {
   // If we don't yet have an output filename, make one.
   if (OutputFilename.empty()) {
@@ -611,7 +610,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
 
   // Figure out where we are going to send the output.
   std::unique_ptr<ToolOutputFile> Out =
-      GetOutputStream(TheTarget->getName(), TheTriple.getOS(), argv[0]);
+      GetOutputStream(TheTriple.getOS(), argv[0]);
   if (!Out) return 1;
 
   // Ensure the filename is passed down to CodeViewDebug.



More information about the llvm-commits mailing list