The clang IFS ASTConsumer was asserting on enums, records (struct definitions in
C), and typedefs. All it needs to do is skip them because the stub just needs to
expose global object instances and functions.
Differential Revision: https://reviews.llvm.org/D68859
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374573
91177308-0d34-0410-b5e6-
96231b3b80d8
HandleTemplateSpecializations(*cast<FunctionTemplateDecl>(ND), Symbols,
RDO);
return true;
+ case Decl::Kind::Record:
+ case Decl::Kind::Typedef:
+ case Decl::Kind::Enum:
+ case Decl::Kind::EnumConstant:
case Decl::Kind::TemplateTypeParm:
return true;
case Decl::Kind::Var:
--- /dev/null
+// RUN: %clang_cc1 -o - -emit-interface-stubs %s | FileCheck %s
+// TODO: Change clang_cc1 to clang when llvm-ifs can accept empty symbol lists.
+
+// CHECK: Symbols:
+// CHECK-NEXT: ...
+
+struct a;
+enum { b };
+typedef int c;
+