aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/FixItRewriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/FixItRewriter.cpp')
-rw-r--r--lib/Frontend/FixItRewriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Frontend/FixItRewriter.cpp b/lib/Frontend/FixItRewriter.cpp
index a53d1e56d1..33ab0b7c99 100644
--- a/lib/Frontend/FixItRewriter.cpp
+++ b/lib/Frontend/FixItRewriter.cpp
@@ -57,8 +57,9 @@ bool FixItRewriter::WriteFixedFile(const std::string &InFileName,
OutFile = &llvm::outs();
} else {
llvm::sys::Path Path(InFileName);
+ std::string Suffix = Path.getSuffix();
Path.eraseSuffix();
- Path.appendSuffix("cpp");
+ Path.appendSuffix("fixit." + Suffix);
std::string Err;
OutFile = new llvm::raw_fd_ostream(Path.toString().c_str(),
// set binary mode (critical for Windoze)