Mesa (7.11): gallivm: fix build with LLVM 3.0svn

Brian Paul brianp at kemper.freedesktop.org
Mon Dec 5 16:02:59 UTC 2011


Module: Mesa
Branch: 7.11
Commit: 98e8fb84de6990b2ec1bbce9b1f3e462c38d1615
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=98e8fb84de6990b2ec1bbce9b1f3e462c38d1615

Author: Tobias Droste <tdroste at gmx.de>
Date:   Sun Sep  4 03:14:23 2011 +0200

gallivm: fix build with LLVM 3.0svn

LLVM 3.0svn moved TargetRegistry.h and TargetSelect.h.
See revision 138450 of LLVM.

Signed-off-by: Tobias Droste <tdroste at gmx.de>
(cherry picked from commit 4a468de2d78fc5a9e6de40a9dae09669ec556fc5)

---

 src/gallium/auxiliary/gallivm/lp_bld_debug.cpp |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index e252607..401e0e2 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -27,17 +27,23 @@
 
 #include <llvm-c/Core.h>
 #include <llvm/Target/TargetMachine.h>
-#include <llvm/Target/TargetRegistry.h>
-#include <llvm/Target/TargetSelect.h>
 #include <llvm/Target/TargetInstrInfo.h>
 #include <llvm/Support/raw_ostream.h>
 #include <llvm/Support/MemoryObject.h>
 
+#if HAVE_LLVM >= 0x0300
+#include <llvm/Support/TargetRegistry.h>
+#include <llvm/Support/TargetSelect.h>
+#else /* HAVE_LLVM < 0x0300 */
+#include <llvm/Target/TargetRegistry.h>
+#include <llvm/Target/TargetSelect.h>
+#endif /* HAVE_LLVM < 0x0300 */
+
 #if HAVE_LLVM >= 0x0209
 #include <llvm/Support/Host.h>
-#else
+#else /* HAVE_LLVM < 0x0209 */
 #include <llvm/System/Host.h>
-#endif
+#endif /* HAVE_LLVM < 0x0209 */
 
 #if HAVE_LLVM >= 0x0207
 #include <llvm/MC/MCDisassembler.h>




More information about the mesa-commit mailing list