summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/utils_llvm.h
diff options
context:
space:
mode:
author TDYa127 <tdy@google.com> 2012-04-21 22:15:31 -0700
committer Shih-wei Liao <sliao@google.com> 2012-04-22 01:34:46 -0700
commit853cd09d6ffc87a270d0d531f84f246d534b8c82 (patch)
treef66b7329f1c6c0d370cd9eeb78ff6a0e86751653 /src/compiler_llvm/utils_llvm.h
parentce154726f34ebfbdce905da008b6359bea9ae50a (diff)
Fix llvm runtime support bug.
Change-Id: I7c023e861cb8738ade67ef66155a318c8bd5735a
Diffstat (limited to 'src/compiler_llvm/utils_llvm.h')
-rw-r--r--src/compiler_llvm/utils_llvm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler_llvm/utils_llvm.h b/src/compiler_llvm/utils_llvm.h
index fb9f0cb3f2..89a1946cb4 100644
--- a/src/compiler_llvm/utils_llvm.h
+++ b/src/compiler_llvm/utils_llvm.h
@@ -19,11 +19,19 @@
#include "stringprintf.h"
+#include <llvm/Analysis/Verifier.h>
+
#include <stdint.h>
#include <string>
namespace art {
+#ifndef NDEBUG
+#define VERIFY_LLVM_FUNCTION(func) llvm::verifyFunction(func, llvm::PrintMessageAction)
+#else
+#define VERIFY_LLVM_FUNCTION(func)
+#endif
+
inline static std::string ElfFuncName(uint16_t elf_func_idx) {
return StringPrintf("Art%u", static_cast<unsigned int>(elf_func_idx));
}