mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2026-07-19 23:24:47 -04:00
[IR] Delete llvm::Constants using the correct type.
In most cases, this doesn't have much impact: the destructors just call the base class destructor anyway. A few subclasses of ConstantExpr actually store non-trivial data, though. Make sure we clean up appropriately. This is sort of ugly, but I don't see a good alternative given the constraints. Issue found by asan buildbots running the testcase for D80330. Differential Revision: https://reviews.llvm.org/D82509
This commit is contained in:
@@ -220,6 +220,6 @@ void BitcodeReaderValueList::resolveConstantForwardRefs() {
|
||||
|
||||
// Update all ValueHandles, they should be the only users at this point.
|
||||
Placeholder->replaceAllUsesWith(RealVal);
|
||||
Placeholder->deleteValue();
|
||||
delete cast<ConstantPlaceHolder>(Placeholder);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user