[PATCH] D66492: [Clang][CodeGen] set alias linkage on QualType
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 23 12:08:19 PDT 2020
nickdesaulniers added a comment.
In D66492#2350947 <https://reviews.llvm.org/D66492#2350947>, @iajbar wrote:
> Clang crashes when calling getLLVMLinkageVarDefinition() in EmitAliasDefinition() when compiling this testcase:
> enum a_type { a , b, c};
> typedef enum a_type b_type;
> void foo(b_type x, enum a_type y){}
> void bar(b_type x, enum b_type y) __attribute__ ((alias ("foo")));
>
> DeclTy is not set because of "enum b_type" is incomplete type. So calling getLLVMLinkageVarDefinition(cast<VarDecl>(GD.getDecl()),..) triggered an assert because GD.getDecl() is FunctionDecl.
Thanks for the report and concise test case; sorry for breaking your build! I'll take a look and CC you when I have a fix.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66492/new/
https://reviews.llvm.org/D66492
More information about the llvm-commits
mailing list