diff --git a/ctx.cpp b/ctx.cpp index fd91cbe3..c4b97b94 100644 --- a/ctx.cpp +++ b/ctx.cpp @@ -386,14 +386,8 @@ FunctionEmitContext::FunctionEmitContext(Function *func, Symbol *funSym, llvm::cast(getDICompositeType(diSubprogramType)); int flags = llvm::DINode::FlagPrototyped; #else /* LLVM 3.8+ */ - Assert(llvm::isa(diSubprogramType)); - llvm::DICompositeType *C = llvm::dyn_cast_or_null(diSubprogramType); - if (!C){ - llvm::DITypeIdentifierMap EmptyMap; - C = llvm::dyn_cast_or_null(llvm::dyn_cast_or_null(diSubprogramType)->getBaseType().resolve(EmptyMap)); - } //restored function getDICompositeType() from 3.7 which absents in 3.8 - llvm::DISubroutineType *diSubprogramType_n = - llvm::cast(C); + Assert(llvm::isa(diSubprogramType)); + llvm::DISubroutineType *diSubprogramType_n = llvm::cast(diSubprogramType); int flags = llvm::DINode::FlagPrototyped; #endif