Per discussion on the list, remove BitcodeVerify pass to reimplement as a free function.

llvm-svn: 146530
This commit is contained in:
Chad Rosier 2011-12-14 00:29:23 +00:00
parent 9bd5208965
commit 1332d9b26a
8 changed files with 0 additions and 21 deletions

View File

@ -25,7 +25,6 @@ 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

View File

@ -72,11 +72,6 @@ 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);

View File

@ -395,9 +395,6 @@ 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">,

View File

@ -28,7 +28,6 @@ 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.

View File

@ -373,10 +373,7 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, raw_ostream *OS) {
break;
case Backend_EmitBC:
case Backend_EmitBCVerify:
getPerModulePasses()->add(createBitcodeWriterPass(*OS));
if (Action == Backend_EmitBCVerify)
getPerModulePasses()->add(createBitcodeVerifierPass(*OS));
break;
case Backend_EmitLL:

View File

@ -301,7 +301,6 @@ static raw_ostream *GetOutputStream(CompilerInstance &CI,
case Backend_EmitLL:
return CI.createDefaultOutputFile(false, InFile, "ll");
case Backend_EmitBC:
case Backend_EmitBCVerify:
return CI.createDefaultOutputFile(true, InFile, "bc");
case Backend_EmitNothing:
return 0;
@ -413,9 +412,6 @@ EmitAssemblyAction::EmitAssemblyAction(llvm::LLVMContext *_VMContext)
EmitBCAction::EmitBCAction(llvm::LLVMContext *_VMContext)
: CodeGenAction(Backend_EmitBC, _VMContext) {}
EmitBCVerifyAction::EmitBCVerifyAction(llvm::LLVMContext *_VMContext)
: CodeGenAction(Backend_EmitBCVerify, _VMContext) {}
EmitLLVMAction::EmitLLVMAction(llvm::LLVMContext *_VMContext)
: CodeGenAction(Backend_EmitLL, _VMContext) {}

View File

@ -406,7 +406,6 @@ static const char *getActionName(frontend::ActionKind Kind) {
case frontend::DumpTokens: return "-dump-tokens";
case frontend::EmitAssembly: return "-S";
case frontend::EmitBC: return "-emit-llvm-bc";
case frontend::EmitBCVerify: return "-emit-llvm-bc-verify";
case frontend::EmitHTML: return "-emit-html";
case frontend::EmitLLVM: return "-emit-llvm";
case frontend::EmitLLVMOnly: return "-emit-llvm-only";
@ -1270,8 +1269,6 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
Opts.ProgramAction = frontend::EmitAssembly; break;
case OPT_emit_llvm_bc:
Opts.ProgramAction = frontend::EmitBC; break;
case OPT_emit_llvm_bc_verify:
Opts.ProgramAction = frontend::EmitBCVerify; break;
case OPT_emit_html:
Opts.ProgramAction = frontend::EmitHTML; break;
case OPT_emit_llvm:

View File

@ -43,7 +43,6 @@ static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) {
case DumpTokens: return new DumpTokensAction();
case EmitAssembly: return new EmitAssemblyAction();
case EmitBC: return new EmitBCAction();
case EmitBCVerify: return new EmitBCVerifyAction();
case EmitHTML: return new HTMLPrintAction();
case EmitLLVM: return new EmitLLVMAction();
case EmitLLVMOnly: return new EmitLLVMOnlyAction();