hfinkel added a comment.

In D71179#1775442 <https://reviews.llvm.org/D71179#1775442>, @jdoerfert wrote:

> > @jdoerfert , how does the ".ompvariant" work with external functions? I see 
> > the part of the spec which says, "The symbol name of a function definition 
> > that appears between a begin declare variant...", but, if we append this 
> > name to, for example, the names of functions present in the device math 
> > library, won't we have a problem with linking?
>
> We restricted it for now to function definitions so we don't need to define 
> the mangling as you cannot expect linking. (I did this to get it in TR8 while 
> I figured it will solve all our math.h problems already).
>  However, we need to avoid collisions with user code, e.g., through the use 
> of symbols in the name that are not allowed to be used by the user (I thought 
> "." is one of them).


Okay, but how to we distinguish functions for which there is a declaration and 
we need the mangling because the user has provided a definition elsewhere, from 
those for which there is a declaration, and we don't want mangling because we 
need to link to some system library?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71179/new/

https://reviews.llvm.org/D71179



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to