mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 20:29:53 +00:00
- '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:
parent
cd7fbf2d0f
commit
1acbea1678
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user