Author: Fangrui Song
Date: 2021-01-11T13:25:20-08:00
New Revision: f4cec703ec8452f9d8b04fae171ba459adf38123

URL: 
https://github.com/llvm/llvm-project/commit/f4cec703ec8452f9d8b04fae171ba459adf38123
DIFF: 
https://github.com/llvm/llvm-project/commit/f4cec703ec8452f9d8b04fae171ba459adf38123.diff

LOG: Add an assert to CGDebugInfo::getTypeOrNull

Added: 
    

Modified: 
    clang/lib/CodeGen/CGDebugInfo.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGDebugInfo.cpp 
b/clang/lib/CodeGen/CGDebugInfo.cpp
index 7dc6457d08d0..2beb80b2ab6c 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.


        
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to