Bug 80243 - Mesa and libclc build failure after llvm >= llvm-3.5svn r211259
Summary: Mesa and libclc build failure after llvm >= llvm-3.5svn r211259
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-19 16:09 UTC by Iaroslav Andrusyak
Modified: 2014-06-21 06:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Iaroslav Andrusyak 2014-06-19 16:09:52 UTC
r211259 - Remove OwningPtr.h and associated tests

This patches fix build.

diff --git a/utils/prepare-builtins.cpp b/utils/prepare-builtins.cpp
index c7f013f..6fdca83 100644
--- a/utils/prepare-builtins.cpp
+++ b/utils/prepare-builtins.cpp
@@ -1,4 +1,3 @@
-#include "llvm/ADT/OwningPtr.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/IR/Function.h"
 #include "llvm/IR/GlobalVariable.h"
@@ -13,6 +12,7 @@
 #include "llvm/Support/ToolOutputFile.h"
 #include "llvm/Config/config.h"
 
+
 using namespace llvm;
 
 #define LLVM_350_AND_NEWER \
@@ -87,7 +87,7 @@ int main(int argc, char **argv) {
   }
 
   std::string ErrorInfo;
-  OwningPtr<tool_output_file> Out
+  std::unique_ptr<tool_output_file> Out
   (new tool_output_file(OutputFilename.c_str(), ErrorInfo,
 #if (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR == 4)
                         sys::fs::F_Binary));






diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index df26883..71a2f31 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -51,9 +51,6 @@
 #include <llvm/MC/MCInstPrinter.h>
 #include <llvm/MC/MCRegisterInfo.h>
 
-#if HAVE_LLVM >= 0x0303
-#include <llvm/ADT/OwningPtr.h>
-#endif
 
 #if HAVE_LLVM >= 0x0305
 #include <llvm/MC/MCContext.h>
@@ -207,9 +204,9 @@ disassemble(const void* func, llvm::raw_ostream & Out)
    const Target *T = TargetRegistry::lookupTarget(Triple, Error);
 
 #if HAVE_LLVM >= 0x0304
-   OwningPtr<const MCAsmInfo> AsmInfo(T->createMCAsmInfo(*T->createMCRegInfo(Triple), Triple));
+   std::unique_ptr <const MCAsmInfo> AsmInfo(T->createMCAsmInfo(*T->createMCRegInfo(Triple), Triple));
 #else
-   OwningPtr<const MCAsmInfo> AsmInfo(T->createMCAsmInfo(Triple));
+   std::unique_ptr<const MCAsmInfo> AsmInfo(T->createMCAsmInfo(Triple));
 #endif
 
    if (!AsmInfo) {
@@ -220,14 +217,14 @@ disassemble(const void* func, llvm::raw_ostream & Out)
 
    unsigned int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
 
-   OwningPtr<const MCRegisterInfo> MRI(T->createMCRegInfo(Triple));
+   std::unique_ptr <const MCRegisterInfo> MRI(T->createMCRegInfo(Triple));
    if (!MRI) {
       Out << "error: no register info for target " << Triple.c_str() << "\n";
       Out.flush();
       return 0;
    }
 
-   OwningPtr<const MCInstrInfo> MII(T->createMCInstrInfo());
+   std::unique_ptr<const MCInstrInfo> MII(T->createMCInstrInfo());
    if (!MII) {
       Out << "error: no instruction info for target " << Triple.c_str() << "\n";
       Out.flush();
@@ -235,12 +232,12 @@ disassemble(const void* func, llvm::raw_ostream & Out)
    }
 
 #if HAVE_LLVM >= 0x0305
-   OwningPtr<const MCSubtargetInfo> STI(T->createMCSubtargetInfo(Triple, sys::getHostCPUName(), ""));
-   OwningPtr<MCContext> MCCtx(new MCContext(AsmInfo.get(), MRI.get(), 0));
-   OwningPtr<const MCDisassembler> DisAsm(T->createMCDisassembler(*STI, *MCCtx));
+   std::unique_ptr<const MCSubtargetInfo> STI(T->createMCSubtargetInfo(Triple, sys::getHostCPUName(), ""));
+   std::unique_ptr<MCContext> MCCtx(new MCContext(AsmInfo.get(), MRI.get(), 0));
+   std::unique_ptr<const MCDisassembler> DisAsm(T->createMCDisassembler(*STI, *MCCtx));
 #else
-   OwningPtr<const MCSubtargetInfo> STI(T->createMCSubtargetInfo(Triple, sys::getHostCPUName(), ""));
-   OwningPtr<const MCDisassembler> DisAsm(T->createMCDisassembler(*STI));
+   std::unique_ptr<const MCSubtargetInfo> STI(T->createMCSubtargetInfo(Triple, sys::getHostCPUName(), ""));
+   std::unique_ptr<const MCDisassembler> DisAsm(T->createMCDisassembler(*STI));
 #endif
    if (!DisAsm) {
       Out << "error: no disassembler for target " << Triple << "\n";
@@ -249,7 +246,7 @@ disassemble(const void* func, llvm::raw_ostream & Out)
    }
 
 
-   OwningPtr<MCInstPrinter> Printer(
+   std::unique_ptr<MCInstPrinter> Printer(
          T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI));
    if (!Printer) {
       Out << "error: no instruction printer for target " << Triple.c_str() << "\n";
@@ -267,7 +264,7 @@ disassemble(const void* func, llvm::raw_ostream & Out)
 #if defined(DEBUG) || defined(PROFILE)
    options.NoFramePointerElim = true;
 #endif
-   OwningPtr<TargetMachine> TM(T->createTargetMachine(Triple, sys::getHostCPUName(), "", options));
+   std::unique_ptr<TargetMachine> TM(T->createTargetMachine(Triple, sys::getHostCPUName(), "", options));
 
    const TargetInstrInfo *TII = TM->getInstrInfo();
Comment 1 Tom Stellard 2014-06-19 16:14:27 UTC
Can you send this patch to mesa-dev@lists.freedesktop.org ?
Comment 2 Iaroslav Andrusyak 2014-06-21 06:08:20 UTC
fixed by 564821c917f4a9d5a0de2ee77b90b0cd85e3d3a6


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.