From f4cec703ec8452f9d8b04fae171ba459adf38123 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 11 Jan 2021 13:25:20 -0800 Subject: [PATCH] Add an assert to CGDebugInfo::getTypeOrNull --- clang/lib/CodeGen/CGDebugInfo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 7dc6457..2beb80b 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -3132,6 +3132,7 @@ static QualType UnwrapTypeForDebugInfo(QualType T, const ASTContext &C) { } llvm::DIType *CGDebugInfo::getTypeOrNull(QualType Ty) { + assert(Ty == UnwrapTypeForDebugInfo(Ty, CGM.getContext())); auto It = TypeCache.find(Ty.getAsOpaquePtr()); if (It != TypeCache.end()) { // Verify that the debug info still exists. -- 2.7.4