Module flag !{i32 7, !"Dwarf Version", i32 5} could be send to DirectX backend in [Module Flags Metadata](https://llvm.org/docs/LangRef.html#id2008). There're 2 things DXIL not supported due to DXIL is based on llvm 3.7. 1. The behavior flag 7 (Max). llvm 3.7 only support behavior flags up to 6. Set it to 7 will hit error when create llvm 3.7 module. 2. Dwarf Version 5. llvm 3.7 only support Dwarf Version up to 4. For behavior flag, clang 3.7 will set it to 2 (Warning) for "Dwarf Version". The fix could be to do the same thing when targeting DXIL. The Dwarf Version issue could be fixed by force the CodeGenOpts.DwarfVersion to 4 when targeting DXIL.