[PATCH] D126559: [MSVC] Fix pragma alloc_text failing for C files
Stephen Long via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 21 06:41:18 PDT 2022
steplong added a comment.
In D126559#3598885 <https://reviews.llvm.org/D126559#3598885>, @hans wrote:
>> Ignoring the `pragma alloc_text`, it looks like GCC compiles the following `foo` with C linkage vs LLVM which compiles with C++ linkage (foo's name is mangled):
>
> The mangled name shouldn't matter since it has internal linkage. I tried dropping the `static`, and then foo doesn't seem to get mangled: https://godbolt.org/z/arzW5TbYz
Oh I see, that makes sense. We aren't accepting https://godbolt.org/z/9Yej9vhYd. Do you know of a way to get the `NamedDecl` with `extern "C"` instead of the second declaration?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126559/new/
https://reviews.llvm.org/D126559
More information about the cfe-commits
mailing list