Skip to content

Commit d5cc962

Browse files
committed
Fix leak in type metadata emission.
We were releasing the owned pointer rather than just letting it get deleted when the unique_ptr goes out of scope. Fixes rdar://problem/26245737.
1 parent 47a247c commit d5cc962

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/IRGen/GenDecl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2422,7 +2422,6 @@ llvm::GlobalValue *IRGenModule::defineTypeMetadata(CanType concreteType,
24222422
if (replace) {
24232423
auto replacer = llvm::ConstantExpr::getBitCast(var, replace->getType());
24242424
replace->replaceAllUsesWith(replacer);
2425-
replace.release();
24262425
}
24272426

24282427
// Keep type metadata around for all types, although the runtime can currently

0 commit comments

Comments
 (0)