Disallow FIX-ITs when generating code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86990 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp
index fdac9b9..e78cc93 100644
--- a/tools/clang-cc/clang-cc.cpp
+++ b/tools/clang-cc/clang-cc.cpp
@@ -558,6 +558,12 @@
       OS.reset(ComputeOutFile(CompOpts, InFile, "bc", true, OutPath));
     }
 
+    // Fix-its can change semantics, disallow with any IRgen action.
+    if (FixItAll || !FixItAtLocations.empty()) {
+      PP.getDiagnostics().Report(diag::err_fe_no_fixit_and_codegen);
+      return 0;
+    }
+
     return CreateBackendConsumer(Act, PP.getDiagnostics(), PP.getLangOptions(),
                                  CompOpts.getCompileOpts(), InFile, OS.get(),
                                  Context);