MaskRay wrote:

> This broke a bot, I reverted and it's back green here: 
> [lab.llvm.org/buildbot/#/builders/272/builds/14069](https://lab.llvm.org/buildbot/#/builders/272/builds/14069)

Thanks. llvm-project/libc has a pattern like the following.

```
namespace libc {
double log2(double x);
}
extern "C" double log2(double);

namespace std {
using ::log2;
}
using std::log2;

namespace libc {
decltype(libc::log2) __log2_impl__ __asm__("log2");
decltype(libc::log2) log2 __attribute__((alias("log2")));
double __log2_impl__(double x) { return x; }
}
```


`ItaniumMangleContextImpl::mangleCXXName` called by `mangleName` (new code in 
this PR) asserts that the parameter is one of 
FunctionDecl/VariableDecl/TemplateParamObjectDecl and fails on a 
`UsingShadowDecl`.
We can check `FunctionDecl` before `mangleCXXName` (we only handle global 
namespace names, where variables are not mangled).

To make the regression test more useful, I'll place it in `CodeGen/alias.cpp` 
separately.

https://github.com/llvm/llvm-project/pull/87130
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to