[PATCH] D66492: [Clang][CodeGen] set alias linkage on QualType

Ikhlas Ajbar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 11:39:22 PDT 2020


iajbar added a comment.

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.


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