forked from OSchip/llvm-project
- 'analyze' and 'as' now explicitly verify input because AsmParser doesn't.
llvm-svn: 3551
This commit is contained in:
parent
ed39ccae8d
commit
2292e551ed
|
@ -14,6 +14,7 @@
|
||||||
#include "llvm/PassManager.h"
|
#include "llvm/PassManager.h"
|
||||||
#include "llvm/Bytecode/Reader.h"
|
#include "llvm/Bytecode/Reader.h"
|
||||||
#include "llvm/Assembly/Parser.h"
|
#include "llvm/Assembly/Parser.h"
|
||||||
|
#include "llvm/Analysis/Verifier.h"
|
||||||
#include "llvm/Support/PassNameParser.h"
|
#include "llvm/Support/PassNameParser.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
@ -114,6 +115,9 @@ int main(int argc, char **argv) {
|
||||||
//
|
//
|
||||||
PassManager Passes;
|
PassManager Passes;
|
||||||
|
|
||||||
|
// Make sure the input LLVM is well formed.
|
||||||
|
Passes.add(createVerifierPass());
|
||||||
|
|
||||||
// Create a new optimization pass for each one specified on the command line
|
// Create a new optimization pass for each one specified on the command line
|
||||||
for (unsigned i = 0; i < AnalysesList.size(); ++i) {
|
for (unsigned i = 0; i < AnalysesList.size(); ++i) {
|
||||||
const PassInfo *Analysis = AnalysesList[i];
|
const PassInfo *Analysis = AnalysesList[i];
|
||||||
|
|
Loading…
Reference in New Issue