[X86] Fix MCNullStreamer support for modules with a CodeView flag
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 15 Nov 2018 15:17:15 +0000 (15:17 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 15 Nov 2018 15:17:15 +0000 (15:17 +0000)
commit0db8cb01472f483ec676c9fc91f3d738365b1bb8
tree469e4bba110ca59a5e92399df912b1b4d0991394
parent35f3da1925f4f5ba5830108db44f053f917b7d55
[X86] Fix MCNullStreamer support for modules with a CodeView flag

This fixes -filetype=null support when compiling for a Win32 target and the module has a CodeView flag.

The only places changed are the uses of getTargetStreamer function - this patch guards both of them with null checks.

Committed on behalf of @eush (Eugene Sharygin)

Differential Revision: https://reviews.llvm.org/D54008

llvm-svn: 346962
llvm/lib/Target/X86/X86AsmPrinter.cpp
llvm/test/CodeGen/X86/null-streamer.ll