Diff Detail
Event Timeline
lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp | ||
---|---|---|
1232 | Instead of the numerous lambda functions making the code reading complicated, Could one make it neater like this ? 234: if (AMDGPUTargetStreamer *S =getTargetStreamer() ) AMDGPUTargetStreamer *getAMDGPUTargetStreamer( ) { if (!OutStreamer) return nullptr; .... } |
I also don't understand why this would be necessary. How can the streamer not be available?
It seems like the TargetStreamer is not created if -emit-codegen-only option is passed to clang cc1. I have hit it last week here:
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/43381/
I haven't had a chance to look at other targets yet. But will when I get a chance.
That seems like a clang bug? I don't understand what the option is for, but isn't there some null streamer it's supposed to use?
Instead of the numerous lambda functions making the code reading complicated, Could one make it neater like this ?
234: if (AMDGPUTargetStreamer *S =getTargetStreamer() )
235: Streamer->EmitGPUSymbolType(...)
236
AMDGPUTargetStreamer *getAMDGPUTargetStreamer( ) {
}