Devirtualize Constant::destroyConstant.
authorPete Cooper <peter_cooper@apple.com>
Tue, 23 Jun 2015 21:55:11 +0000 (21:55 +0000)
committerPete Cooper <peter_cooper@apple.com>
Tue, 23 Jun 2015 21:55:11 +0000 (21:55 +0000)
commitd621812aace417eb21a940119443bc02eeaa93cf
treea6685dd200567367853e8113defc22419163f06f
parent3ebe082ff9db28870f6e6eb5366ec7d95b2075f5
Devirtualize Constant::destroyConstant.

This reorganizes destroyConstant and destroyConstantImpl.

Now there is only destroyConstant in Constant itself, while
subclasses are required to implement destroyConstantImpl.

destroyConstantImpl no longer calls delete but is instead only
responsible for removing the constant from any maps in which it
is contained.

Reviewed by Duncan Exon Smith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240471 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Constant.h
include/llvm/IR/Constants.h
include/llvm/IR/GlobalValue.h
lib/IR/Constants.cpp
lib/IR/Globals.cpp