llvm-project/clang/test/Misc/win32-elf.c
Phoebe Wang 99b2581a4b
Reland "[Win32][ELF] Make CodeView a DebugInfoFormat only for COFF format", second try (#88245)
This is a second try to reland
https://github.com/llvm/llvm-project/pull/87149.

The previous commit exposed failures on some targets. The reason is only
a few targets support COFF ObjectFormatType on Windows:
https://github.com/llvm/llvm-project/blob/main/llvm/lib/TargetParser/Triple.cpp#L835-L842

With https://github.com/llvm/llvm-project/pull/87149, the targets don't
support COFF will report "warning: argument unused during compilation:
'-gcodeview-command-line' [-Wunused-command-line-argument]" in the test
gcodeview-command-line.c

I was thinking `REQUIRES: *-registered-target` could solve the problem,
but it didn't. We need to check the actual triple instead of just
`*-registered-target`.
2024-06-05 09:56:08 +08:00

6 lines
263 B
C

// Check that basic use of win32-elf targets works.
// RUN: %clang -fsyntax-only -target x86_64-pc-win32-elf %s
// RUN: %clang -fsyntax-only -target x86_64-pc-win32-elf -g %s -### 2>&1 | FileCheck %s -check-prefix=DEBUG-INFO
// DEBUG-INFO: -dwarf-version={{.*}}