[llvm] r364318 - [AMDGPU] Null checking on TS to avoid crashing in clang tests.
Michael Liao via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 07:06:34 PDT 2019
Author: hliao
Date: Tue Jun 25 07:06:34 2019
New Revision: 364318
URL: http://llvm.org/viewvc/llvm-project?rev=364318&view=rev
Log:
[AMDGPU] Null checking on TS to avoid crashing in clang tests.
- `test/Misc/backend-resource-limit-diagnostics.cl` crashes as null
streamer is used.
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp?rev=364318&r1=364317&r2=364318&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Tue Jun 25 07:06:34 2019
@@ -326,7 +326,8 @@ void AMDGPUAsmPrinter::EmitGlobalVariabl
EmitVisibility(GVSym, GV->getVisibility(), !GV->isDeclaration());
EmitLinkage(GV, GVSym);
- getTargetStreamer()->emitAMDGPULDS(GVSym, Size, Align);
+ if (auto TS = getTargetStreamer())
+ TS->emitAMDGPULDS(GVSym, Size, Align);
return;
}
More information about the llvm-commits
mailing list