diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-02 03:14:12 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-02 03:14:12 +0000 |
commit | 261034861d2c8cfbd6036e56f22f57d7a3736861 (patch) | |
tree | d2f920e1dcc2ec4ba1ae573f71d80212c3fd844c /lib/Frontend/FixItRewriter.cpp | |
parent | b8adaf905342129a62c989739d113a7cec7c5ff3 (diff) |
Clean up -fixit output slightly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/FixItRewriter.cpp')
-rw-r--r-- | lib/Frontend/FixItRewriter.cpp | 3 |
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) |