Skip to content

[DirectX backend] Illegal Dwarf Version emitted to final dxil. #96912

@python3kgae

Description

@python3kgae

Module flag !{i32 7, !"Dwarf Version", i32 5} could be send to DirectX backend in Module Flags Metadata.

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions