forked from OSchip/llvm-project
Verify the whole module after codegen to catch silly IR bugs.
llvm-svn: 50485
This commit is contained in:
parent
e16406d2b1
commit
dd477ce32b
|
@ -24,6 +24,7 @@
|
|||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Intrinsics.h"
|
||||
#include "llvm/Analysis/Verifier.h"
|
||||
#include <algorithm>
|
||||
using namespace clang;
|
||||
using namespace CodeGen;
|
||||
|
@ -48,6 +49,9 @@ CodeGenModule::~CodeGenModule() {
|
|||
EmitGlobalCtors();
|
||||
EmitAnnotations();
|
||||
delete Runtime;
|
||||
|
||||
// Run the verifier to check that the generated code is consistent.
|
||||
assert(!verifyModule(TheModule));
|
||||
}
|
||||
|
||||
/// WarnUnsupported - Print out a warning that codegen doesn't support the
|
||||
|
|
Loading…
Reference in New Issue