File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1780,8 +1780,16 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1780
1780
return createType (DbgTy, " " , TheCU, MainFile);
1781
1781
1782
1782
// Look in the cache first.
1783
- if (auto *DITy = getTypeOrNull (DbgTy.getType ()))
1783
+ if (auto *DITy = getTypeOrNull (DbgTy.getType ())) {
1784
+ // FIXME: Enable this assertion.
1785
+ #if SWIFT_DEBUGINFO_CACHE_VERIFICATION
1786
+ if (auto CachedSize = DbgTy.getTypeSize ()) {
1787
+ if (unsigned Size = getSizeInBits (DITy))
1788
+ assert (llvm::alignTo (Size, 8 ) / 8 == CachedSize->getValue ());
1789
+ }
1790
+ #endif
1784
1791
return DITy;
1792
+ }
1785
1793
1786
1794
// Second line of defense: Look up the mangled name. TypeBase*'s are
1787
1795
// not necessarily unique, but name mangling is too expensive to do
@@ -2084,7 +2092,6 @@ void IRGenDebugInfoImpl::setCurrentLoc(IRBuilder &Builder,
2084
2092
Scope = DBuilder.createLexicalBlockFile (Scope, File);
2085
2093
}
2086
2094
2087
- // FIXME: Enable this assertion.
2088
2095
assert (lineEntryIsSane (L, DS) &&
2089
2096
" non-contiguous debug location in same scope at -Onone" );
2090
2097
LastFilenameAndLocation = L;
You can’t perform that action at this time.
0 commit comments