serge-sans-paille added a comment.

> So if isInlineBuiltinDeclaration() simply returns false for C++ code, 
> everything should just work, without messing with the linkage.

Unfortunately not. See the example from 
`clang/test/CodeGen/inline-builtin-comdat.c` above. There's no C++ involved, 
the actual issue is that the initial Global Declacaration is stripped from its 
body which is moved to it's `.inline` suffixed version. But during codegen, if 
we don't take into account the fact that it's an inline builtin, we still put 
it in a COMDAT (because it's *inline*) while it shouldn't (because it's a 
declaration. I've uploaded a new patch that should be slightly less intrusive.


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

https://reviews.llvm.org/D148723

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

Reply via email to