<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Mesa and libclc build failure after llvm >= llvm-3.5svn r211259"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=80243">80243</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Mesa and libclc build failure after llvm >= llvm-3.5svn r211259
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>pontostroy@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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();</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>