Skip to content

Commit 7738727

Browse files
committed
fixup! [TEMPORARY] Make Cppinterop happy temporarily
1 parent 44baf2a commit 7738727

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

interpreter/CppInterOp/lib/CppInterOp/CppInterOp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,7 @@ TCppType_t GetType(const std::string& name) {
19701970

19711971
auto* D = (Decl*)GetNamed(name, /* Within= */ 0);
19721972
if (auto* TD = llvm::dyn_cast_or_null<TypeDecl>(D)) {
1973-
return QualType(TD->getTypeForDecl(), 0).getAsOpaquePtr();
1973+
return getASTContext().getTypeDeclType(TD).getAsOpaquePtr();
19741974
}
19751975

19761976
return (TCppType_t)0;
@@ -2049,7 +2049,7 @@ static void GetDeclName(const clang::Decl* D, ASTContext& Context,
20492049
// Handle the typedefs to anonymous types.
20502050
QT = Typedef->getTypeSourceInfo()->getType();
20512051
} else
2052-
QT = {TD->getTypeForDecl(), 0};
2052+
QT = TD->getASTContext().getTypeDeclType(TD);
20532053
get_type_as_string(QT, name, Context, Policy);
20542054
} else if (const NamedDecl* ND = dyn_cast<NamedDecl>(D)) {
20552055
// This is a namespace member.

0 commit comments

Comments
 (0)