[llvm] 85c779d - [llc] -filetype=null: don't create .null if -o is not specified
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 17:29:05 PDT 2020
Author: Fangrui Song
Date: 2020-10-12T17:28:59-07:00
New Revision: 85c779d256207fe82ba876d19724c497ee904be7
URL: https://github.com/llvm/llvm-project/commit/85c779d256207fe82ba876d19724c497ee904be7
DIFF: https://github.com/llvm/llvm-project/commit/85c779d256207fe82ba876d19724c497ee904be7.diff
LOG: [llc] -filetype=null: don't create .null if -o is not specified
The new behavior is consistent with llvm-mc -filetype=null.
Added:
Modified:
llvm/test/CodeGen/X86/null-streamer.ll
llvm/tools/llc/llc.cpp
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/null-streamer.ll b/llvm/test/CodeGen/X86/null-streamer.ll
index 28a457f64d4a..3d5f682f75c2 100644
--- a/llvm/test/CodeGen/X86/null-streamer.ll
+++ b/llvm/test/CodeGen/X86/null-streamer.ll
@@ -1,7 +1,8 @@
; Check the MCNullStreamer operates correctly, at least on a minimal test case.
;
+; RUN: rm -f %t
; RUN: llc -filetype=null -o %t -mtriple=i686-- %s
-; RUN: llc -filetype=null -o %t -mtriple=i686-cygwin %s
+; RUN: ls %t
source_filename = "test/CodeGen/X86/null-streamer.ll"
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 98a2735887c0..b58e8486db8c 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -224,7 +224,7 @@ static std::unique_ptr<ToolOutputFile> GetOutputStream(const char *TargetName,
OutputFilename += ".o";
break;
case CGFT_Null:
- OutputFilename += ".null";
+ OutputFilename = "-";
break;
}
}
More information about the llvm-commits
mailing list