aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rw-r--r--sparse-llvm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sparse-llvm.c b/sparse-llvm.c
index 5bcc7589..e02e212f 100644
--- a/sparse-llvm.c
+++ b/sparse-llvm.c
@@ -5,6 +5,7 @@
#include <llvm-c/Core.h>
#include <llvm-c/BitWriter.h>
+#include <llvm-c/Analysis.h>
#include <stdbool.h>
#include <stdio.h>
@@ -1253,6 +1254,8 @@ int main(int argc, char **argv)
compile(module, sparse(file));
} END_FOR_EACH_PTR_NOTAG(file);
+ LLVMVerifyModule(module, LLVMPrintMessageAction, NULL);
+
LLVMWriteBitcodeToFD(module, STDOUT_FILENO, 0, 0);
LLVMDisposeModule(module);