aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/CodeGen/BackendUtil.h1
-rw-r--r--include/clang/CodeGen/CodeGenAction.h5
-rw-r--r--include/clang/Driver/CC1Options.td3
-rw-r--r--include/clang/Frontend/FrontendOptions.h1
4 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/CodeGen/BackendUtil.h b/include/clang/CodeGen/BackendUtil.h
index 135b6a927f..85f8aa0803 100644
--- a/include/clang/CodeGen/BackendUtil.h
+++ b/include/clang/CodeGen/BackendUtil.h
@@ -25,6 +25,7 @@ namespace clang {
enum BackendAction {
Backend_EmitAssembly, ///< Emit native assembly files
Backend_EmitBC, ///< Emit LLVM bitcode files
+ Backend_EmitBCVerify, ///< Emit LLVM bitcode files and verify
Backend_EmitLL, ///< Emit human-readable LLVM assembly
Backend_EmitNothing, ///< Don't emit anything (benchmarking mode)
Backend_EmitMCNull, ///< Run CodeGen, but don't emit anything
diff --git a/include/clang/CodeGen/CodeGenAction.h b/include/clang/CodeGen/CodeGenAction.h
index 9697bc62af..6545a470f5 100644
--- a/include/clang/CodeGen/CodeGenAction.h
+++ b/include/clang/CodeGen/CodeGenAction.h
@@ -72,6 +72,11 @@ public:
EmitBCAction(llvm::LLVMContext *_VMContext = 0);
};
+class EmitBCVerifyAction : public CodeGenAction {
+public:
+ EmitBCVerifyAction(llvm::LLVMContext *_VMContext = 0);
+};
+
class EmitLLVMAction : public CodeGenAction {
public:
EmitLLVMAction(llvm::LLVMContext *_VMContext = 0);
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td
index e8c5398dec..ad891272b1 100644
--- a/include/clang/Driver/CC1Options.td
+++ b/include/clang/Driver/CC1Options.td
@@ -395,6 +395,9 @@ def emit_llvm : Flag<"-emit-llvm">,
HelpText<"Build ASTs then convert to LLVM, emit .ll file">;
def emit_llvm_bc : Flag<"-emit-llvm-bc">,
HelpText<"Build ASTs then convert to LLVM, emit .bc file">;
+def emit_llvm_bc_verify : Flag<"-emit-llvm-bc-verify">,
+ HelpText<"Build ASTs then convert to LLVM, emit .bc file"
+ " and finally verify bitcode serialization/deserialization">;
def emit_llvm_only : Flag<"-emit-llvm-only">,
HelpText<"Build ASTs and convert to LLVM, discarding output">;
def emit_codegen_only : Flag<"-emit-codegen-only">,
diff --git a/include/clang/Frontend/FrontendOptions.h b/include/clang/Frontend/FrontendOptions.h
index fa6d044ce0..0af5b4574c 100644
--- a/include/clang/Frontend/FrontendOptions.h
+++ b/include/clang/Frontend/FrontendOptions.h
@@ -28,6 +28,7 @@ namespace frontend {
DumpTokens, ///< Dump out preprocessed tokens.
EmitAssembly, ///< Emit a .s file.
EmitBC, ///< Emit a .bc file.
+ EmitBCVerify, ///< Emit and verify .bc file.
EmitHTML, ///< Translate input source into HTML.
EmitLLVM, ///< Emit a .ll file.
EmitLLVMOnly, ///< Generate LLVM IR, but do not emit anything.