[llvm-commits] [llvm] r111370 - /llvm/trunk/tools/llc/llc.cpp
Dan Gohman
gohman at apple.com
Wed Aug 18 10:26:50 PDT 2010
Author: djg
Date: Wed Aug 18 12:26:50 2010
New Revision: 111370
URL: http://llvm.org/viewvc/llvm-project?rev=111370&view=rev
Log:
Don't translate "-" to outs() manually; raw_ostream does that
automatically.
Modified:
llvm/trunk/tools/llc/llc.cpp
Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=111370&r1=111369&r2=111370&view=diff
==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Wed Aug 18 12:26:50 2010
@@ -127,14 +127,11 @@
static formatted_raw_ostream *GetOutputStream(const char *TargetName,
Triple::OSType OS,
const char *ProgName) {
- if (OutputFilename != "") {
- if (OutputFilename == "-")
- return new formatted_raw_ostream(outs(),
- formatted_raw_ostream::PRESERVE_STREAM);
-
+ if (!OutputFilename.empty()) {
// Make sure that the Out file gets unlinked from the disk if we get a
// SIGINT
- sys::RemoveFileOnSignal(sys::Path(OutputFilename));
+ if (OutputFilename != "-")
+ sys::RemoveFileOnSignal(sys::Path(OutputFilename));
std::string error;
raw_fd_ostream *FDOut =
More information about the llvm-commits
mailing list