From 168d4e2945a9d3ba2aa88aad65e0a15bddcf7e58 Mon Sep 17 00:00:00 2001 From: Purva-Chaudhari Date: Tue, 2 Aug 2022 12:29:26 +0530 Subject: [PATCH] Handles failing driver tests of clang 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 | 4 ++++ clang/test/Interpreter/incremental-mode.cpp | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 clang/test/Interpreter/incremental-mode.cpp diff --git a/clang/lib/Interpreter/IncrementalParser.cpp b/clang/lib/Interpreter/IncrementalParser.cpp index db854c4..32eeb1b 100644 --- a/clang/lib/Interpreter/IncrementalParser.cpp +++ b/clang/lib/Interpreter/IncrementalParser.cpp @@ -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 index 0000000..e6350d2 --- /dev/null +++ b/clang/test/Interpreter/incremental-mode.cpp @@ -0,0 +1,3 @@ +// RUN: clang-repl -Xcc -E +// RUN: clang-repl -Xcc -emit-llvm +// expected-no-diagnostics -- 2.7.4