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/DerivedTypes.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
#include "llvm/Intrinsics.h"
|
#include "llvm/Intrinsics.h"
|
||||||
|
#include "llvm/Analysis/Verifier.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace clang;
|
using namespace clang;
|
||||||
using namespace CodeGen;
|
using namespace CodeGen;
|
||||||
|
@ -48,6 +49,9 @@ CodeGenModule::~CodeGenModule() {
|
||||||
EmitGlobalCtors();
|
EmitGlobalCtors();
|
||||||
EmitAnnotations();
|
EmitAnnotations();
|
||||||
delete Runtime;
|
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
|
/// WarnUnsupported - Print out a warning that codegen doesn't support the
|
||||||
|
|
Loading…
Reference in New Issue