From e3388c42f39b6715e9aa1c7594fb0dcf9429e111 Mon Sep 17 00:00:00 2001 From: Puyan Lotfi Date: Fri, 11 Oct 2019 17:24:11 +0000 Subject: [clang][IFS] Fixing assert in clang interface stubs for enums, records, typedefs 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 llvm-svn: 374573 --- clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp') diff --git a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp index 73584eb98df..5e6cc65e021 100644 --- a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp +++ b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp @@ -177,6 +177,10 @@ class InterfaceStubFunctionsConsumer : public ASTConsumer { HandleTemplateSpecializations(*cast(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: -- cgit v1.2.3