Handles failing driver tests of clang
authorPurva-Chaudhari <purva.chaudhari02@gmail.com>
Tue, 2 Aug 2022 06:59:26 +0000 (12:29 +0530)
committerPurva-Chaudhari <purva.chaudhari02@gmail.com>
Tue, 2 Aug 2022 06:59:26 +0000 (12:29 +0530)
Added support for incremental mode 8 and 28 ie. `frontend::EmitBC:` and `frontend::PrintPreprocessedInput:`
Added supporting clang tests to test in clang-repl mode

Reviewed By: v.g.vassilev

Differential Revision: https://reviews.llvm.org/D125946

clang/lib/Interpreter/IncrementalParser.cpp
clang/test/Interpreter/incremental-mode.cpp [new file with mode: 0644]

index db854c4..32eeb1b 100644 (file)
@@ -69,8 +69,12 @@ public:
             LLVM_FALLTHROUGH;
           case frontend::EmitAssembly:
             LLVM_FALLTHROUGH;
+          case frontend::EmitBC:
+            LLVM_FALLTHROUGH;
           case frontend::EmitObj:
             LLVM_FALLTHROUGH;
+          case frontend::PrintPreprocessedInput:
+            LLVM_FALLTHROUGH;
           case frontend::EmitLLVMOnly:
             Act.reset(new EmitLLVMOnlyAction(&LLVMCtx));
             break;
diff --git a/clang/test/Interpreter/incremental-mode.cpp b/clang/test/Interpreter/incremental-mode.cpp
new file mode 100644 (file)
index 0000000..e6350d2
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: clang-repl -Xcc -E
+// RUN: clang-repl -Xcc -emit-llvm 
+// expected-no-diagnostics