forked from OSchip/llvm-project
[AMDGPU] Null checking on TS to avoid crashing in clang tests.
- `test/Misc/backend-resource-limit-diagnostics.cl` crashes as null streamer is used. llvm-svn: 364318
This commit is contained in:
parent
34cac0955d
commit
f0a665afca
|
@ -326,7 +326,8 @@ void AMDGPUAsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
|
|||
|
||||
EmitVisibility(GVSym, GV->getVisibility(), !GV->isDeclaration());
|
||||
EmitLinkage(GV, GVSym);
|
||||
getTargetStreamer()->emitAMDGPULDS(GVSym, Size, Align);
|
||||
if (auto TS = getTargetStreamer())
|
||||
TS->emitAMDGPULDS(GVSym, Size, Align);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue