dblaikie added subscribers: JDevlieghere, rjmccall.
dblaikie added a comment.

OK - poked around a bit more to better understand this, so attempting to 
summarize my current understanding (excuse the repetition from previous parts 
of this thread) and results.

- `__attribute__((overloadable))` can/does mangle K&R C style declarations 
<https://reviews.llvm.org/D98799#2638997>
- with this patch (currently committed), `-funique-internal-linkage-names` does 
not mangle K&R C style declarations (see `bar` in the included test case, 
unmangled)
- I'd like to avoid that divergence if possible
- Changing the debug info code to be more generous with names it mangles (by 
using `FD->getType()->getAs<FunctionProtoType>()` rather than `hasPrototype()`) 
causes problems
  - Specifically: Objective C blocks (which have a `FunctionProtoType` type, 
but `!hasPrototype` it seems) are missing parameter info so this 
<https://github.com/llvm-mirror/clang/blob/aa231e4be75ac4759c236b755c57876f76e3cf05/lib/AST/ItaniumMangle.cpp#L2908>
 call crashes
    - There doesn't seem to be any way to test for this property of the 
`FunctionDecl` that I can see - where it has a type, but doesn't have parameter 
info

Trying to pull in some folks who might know what's going on here/be able to 
suggest a way to split these cases if needed, or fix the block `FunctionDecl`s 
to have param info. @rjmccall @JDevlieghere - I'd really appreciate some help 
here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98799

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

Reply via email to