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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits