[flang-commits] [flang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #67592)
Zahira Ammarguellat via flang-commits
flang-commits at lists.llvm.org
Thu Oct 5 05:55:47 PDT 2023
zahiraam wrote:
> struct S { int x; };
> namespace NS {
> class C {};
> }
>
> S foo(S s1, NS::C c1) {
> S s12{12};
> using namespace NS;
> C c;
> }
@AaronBallman By pretty printed you mean the use of __PRETTY_FUNCTION__ right?
In MSVC this macro is not defined. The equivalent one is FUNCSIG, although maybe not quite the same.
On Linux GCC and clang are generating the same string. See https://godbolt.org/z/zd37orvdG
I can't figure out from godbolt, what string is generated for clang on Windows. Running on the command line (without my patch), in the asm output I see
.asciz "S foo(S, NS::C)"
That's different than what MSVC is generating with __FUNCSIG__. If we want to generate struct S foo(struct S,class NS::C then this seems to always have been broken. Right?
https://github.com/llvm/llvm-project/pull/67592
More information about the flang-commits
mailing list