Contents of /trunk/mesa/patches/mesa-8.0.3-llvm31.patch
Parent Directory | Revision Log
Revision 1831 -
(show annotations)
(download)
Tue Jul 3 09:24:20 2012 UTC (12 years, 2 months ago) by niro
File size: 1690 byte(s)
Tue Jul 3 09:24:20 2012 UTC (12 years, 2 months ago) by niro
File size: 1690 byte(s)
-fixed ftbfs with llvm-3.1
1 | diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp |
2 | index a50a51d..f1bb4d9 100644 |
3 | --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp |
4 | +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp |
5 | @@ -235,7 +235,24 @@ lp_disassemble(const void* func) |
6 | int AsmPrinterVariant = AsmInfo->getAssemblerDialect(); |
7 | #endif |
8 | |
9 | -#if HAVE_LLVM >= 0x0300 |
10 | +#if HAVE_LLVM >= 0x0301 |
11 | + OwningPtr<const MCRegisterInfo> MRI(T->createMCRegInfo(Triple)); |
12 | + if (!MRI) { |
13 | + debug_printf("error: no register info for target %s\n", Triple.c_str()); |
14 | + return; |
15 | + } |
16 | + |
17 | + OwningPtr<const MCInstrInfo> MII(T->createMCInstrInfo()); |
18 | + if (!MII) { |
19 | + debug_printf("error: no instruction info for target %s\n", Triple.c_str()); |
20 | + return; |
21 | + } |
22 | +#endif |
23 | + |
24 | +#if HAVE_LLVM >= 0x0301 |
25 | + OwningPtr<MCInstPrinter> Printer( |
26 | + T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI)); |
27 | +#elif HAVE_LLVM == 0x0300 |
28 | OwningPtr<MCInstPrinter> Printer( |
29 | T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI)); |
30 | #elif HAVE_LLVM >= 0x0208 |
31 | diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp |
32 | index fe7616b..68f8808 100644 |
33 | --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp |
34 | +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp |
35 | @@ -62,7 +62,11 @@ |
36 | extern "C" void |
37 | lp_register_oprofile_jit_event_listener(LLVMExecutionEngineRef EE) |
38 | { |
39 | +#if HAVE_LLVM >= 0x0301 |
40 | + llvm::unwrap(EE)->RegisterJITEventListener(llvm::JITEventListener::createOProfileJITEventListener()); |
41 | +#else |
42 | llvm::unwrap(EE)->RegisterJITEventListener(llvm::createOProfileJITEventListener()); |
43 | +#endif |
44 | } |