Preserve the full name of the file, so that '-c -o foo.pic.o' produces
foo.pic.gcno instead of foo.gcno.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130899 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td
index 7908b8f..3c0c3c5 100644
--- a/include/clang/Driver/CC1Options.td
+++ b/include/clang/Driver/CC1Options.td
@@ -140,9 +140,9 @@
   HelpText<"Emit a gcov coverage notes file when compiling.">;
 def femit_coverage_data: Flag<"-femit-coverage-data">,
   HelpText<"Instrument the program to emit gcov coverage data when run.">;
-def coverage_dir : Separate<"-coverage-dir">,
-  HelpText<"Emit coverage data to this directory.">;
-def coverage_dir_EQ : Joined<"-coverage-dir=">, Alias<coverage_dir>;
+def coverage_file : Separate<"-coverage-file">,
+  HelpText<"Emit coverage data to this filename. The extension will be replaced.">;
+def coverage_file_EQ : Joined<"-coverage-file=">, Alias<coverage_file>;
 def relaxed_aliasing : Flag<"-relaxed-aliasing">,
   HelpText<"Turn off Type Based Alias Analysis">;
 def masm_verbose : Flag<"-masm-verbose">,
diff --git a/include/clang/Frontend/CodeGenOptions.h b/include/clang/Frontend/CodeGenOptions.h
index 7221f0d..1c686c7 100644
--- a/include/clang/Frontend/CodeGenOptions.h
+++ b/include/clang/Frontend/CodeGenOptions.h
@@ -95,8 +95,9 @@
   /// The code model to use (-mcmodel).
   std::string CodeModel;
 
-  /// The directory in which to place coverage data files.
-  std::string CoverageDir;
+  /// The filename with path we use for coverage files. The extension will be
+  /// replaced.
+  std::string CoverageFile;
 
   /// Enable additional debugging information.
   std::string DebugPass;