[Mesa-dev] [Bug 80243] New: Mesa and libclc build failure after llvm >= llvm-3.5svn r211259
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Jun 19 09:09:52 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=80243
Priority: medium
Bug ID: 80243
Assignee: mesa-dev at lists.freedesktop.org
Summary: Mesa and libclc build failure after llvm >=
llvm-3.5svn r211259
Severity: normal
Classification: Unclassified
OS: All
Reporter: pontostroy at gmail.com
Hardware: Other
Status: NEW
Version: unspecified
Component: Other
Product: Mesa
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();
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140619/42eba136/attachment.html>
More information about the mesa-dev
mailing list