summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 7e5e8f06b70..bf1f0d823d7 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -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
OpenPOWER on IntegriCloud