[PATCH] R600: Fix up for AsmPrinter's OutStreamer being a unique_ptr
Michel Dänzer
michel at daenzer.net
Mon Apr 27 02:59:03 PDT 2015
From: Michel Dänzer <michel.daenzer at amd.com>
Fixes a crash with basically any OpenGL application using the radeonsi
driver.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90176
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
lib/Target/R600/AMDGPUMCInstLower.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Target/R600/AMDGPUMCInstLower.cpp b/lib/Target/R600/AMDGPUMCInstLower.cpp
index b00bd8d..708bb6f 100644
--- a/lib/Target/R600/AMDGPUMCInstLower.cpp
+++ b/lib/Target/R600/AMDGPUMCInstLower.cpp
@@ -132,8 +132,8 @@ void AMDGPUAsmPrinter::EmitInstruction(const MachineInstr *MI) {
SmallVector<char, 16> CodeBytes;
raw_svector_ostream CodeStream(CodeBytes);
- MCObjectStreamer &ObjStreamer = (MCObjectStreamer &)OutStreamer;
- MCCodeEmitter &InstEmitter = ObjStreamer.getAssembler().getEmitter();
+ MCObjectStreamer *ObjStreamer = (MCObjectStreamer *)OutStreamer.get();
+ MCCodeEmitter &InstEmitter = ObjStreamer->getAssembler().getEmitter();
InstEmitter.EncodeInstruction(TmpInst, CodeStream, Fixups,
MF->getSubtarget<MCSubtargetInfo>());
CodeStream.flush();
--
2.1.4
More information about the llvm-commits
mailing list