gallivm: Fix createOProfileJITEventListener namespace with llvm-3.1.
authorVinson Lee <vlee@freedesktop.org>
Wed, 14 Mar 2012 05:40:52 +0000 (22:40 -0700)
committerVinson Lee <vlee@freedesktop.org>
Wed, 14 Mar 2012 16:30:40 +0000 (09:30 -0700)
llvm-3.1svn r152620 refactored the OProfile profiling code.
createOProfileJITEventListener was moved from the llvm namespace to the
llvm::JITEventListener namespace.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp

index fe7616b9ecfd584ffb27cab41e77386681bec15f..68f8808f3effae419e6d18102bc9259350282f29 100644 (file)
 extern "C" void
 lp_register_oprofile_jit_event_listener(LLVMExecutionEngineRef EE)
 {
+#if HAVE_LLVM >= 0x0301
+   llvm::unwrap(EE)->RegisterJITEventListener(llvm::JITEventListener::createOProfileJITEventListener());
+#else
    llvm::unwrap(EE)->RegisterJITEventListener(llvm::createOProfileJITEventListener());
+#endif
 }