- 'analyze' and 'as' now explicitly verify input because AsmParser doesn't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3552 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-08-30 22:54:41 +00:00
parent cd7fbf2d0f
commit 1acbea1678
3 changed files with 21 additions and 0 deletions

View File

@ -12,6 +12,7 @@
#include "llvm/Module.h"
#include "llvm/Assembly/Parser.h"
#include "llvm/Bytecode/Writer.h"
#include "llvm/Analysis/Verifier.h"
#include "Support/CommandLine.h"
#include "Support/Signals.h"
#include <fstream>
@ -43,6 +44,12 @@ int main(int argc, char **argv) {
cerr << argv[0] << ": assembly didn't read correctly.\n";
return 1;
}
if (verifyModule(*M.get())) {
cerr << argv[0] << ": assembly parsed, but does not verify as correct!\n";
return 1;
}
if (DumpAsm) cerr << "Here's the assembly:\n" << M.get();

View File

@ -12,6 +12,7 @@
#include "llvm/Module.h"
#include "llvm/Assembly/Parser.h"
#include "llvm/Bytecode/Writer.h"
#include "llvm/Analysis/Verifier.h"
#include "Support/CommandLine.h"
#include "Support/Signals.h"
#include <fstream>
@ -43,6 +44,12 @@ int main(int argc, char **argv) {
cerr << argv[0] << ": assembly didn't read correctly.\n";
return 1;
}
if (verifyModule(*M.get())) {
cerr << argv[0] << ": assembly parsed, but does not verify as correct!\n";
return 1;
}
if (DumpAsm) cerr << "Here's the assembly:\n" << M.get();

View File

@ -12,6 +12,7 @@
#include "llvm/Module.h"
#include "llvm/Assembly/Parser.h"
#include "llvm/Bytecode/Writer.h"
#include "llvm/Analysis/Verifier.h"
#include "Support/CommandLine.h"
#include "Support/Signals.h"
#include <fstream>
@ -43,6 +44,12 @@ int main(int argc, char **argv) {
cerr << argv[0] << ": assembly didn't read correctly.\n";
return 1;
}
if (verifyModule(*M.get())) {
cerr << argv[0] << ": assembly parsed, but does not verify as correct!\n";
return 1;
}
if (DumpAsm) cerr << "Here's the assembly:\n" << M.get();