This patch forces the emission of CFI information when the uwtable attribute is present and the ExceptionModel is None.
The uwtable attribute is set by the the frontend when, for example, the address sanitizer is used.
I think few things are missing in this patch:
- a test on a target different from amdgpu that also uses cfi for the unwind tables, but that doesn't use DwarfCFI as exception model
- a test on clang's side to ensure that -fsanitize=address adds the -unwind-tables=2 attribute on amdgpu (this should probably go o a separate patch)
Could this condition be relaxed to any EHType as long as DwarfCFI is supported?