summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Globals.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-06-23 21:55:11 +0000
committerPete Cooper <peter_cooper@apple.com>2015-06-23 21:55:11 +0000
commit86dd4cf5a1a3e39c1dc2c59982013a7259285689 (patch)
treee1508899a4905254fa6e7b769c43b88b27743904 /llvm/lib/IR/Globals.cpp
parentf1ba14104131debcaaef46f843d472b38e4882f5 (diff)
downloadbcm5719-llvm-86dd4cf5a1a3e39c1dc2c59982013a7259285689.tar.gz
bcm5719-llvm-86dd4cf5a1a3e39c1dc2c59982013a7259285689.zip
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. llvm-svn: 240471
Diffstat (limited to 'llvm/lib/IR/Globals.cpp')
-rw-r--r--llvm/lib/IR/Globals.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp
index 79a458c26f7..a431b5c6100 100644
--- a/llvm/lib/IR/Globals.cpp
+++ b/llvm/lib/IR/Globals.cpp
@@ -42,10 +42,10 @@ void GlobalValue::dematerialize() {
getParent()->dematerialize(this);
}
-/// Override destroyConstant to make sure it doesn't get called on
+/// Override destroyConstantImpl to make sure it doesn't get called on
/// GlobalValue's because they shouldn't be treated like other constants.
-void GlobalValue::destroyConstant() {
- llvm_unreachable("You can't GV->destroyConstant()!");
+void GlobalValue::destroyConstantImpl() {
+ llvm_unreachable("You can't GV->destroyConstantImpl()!");
}
/// copyAttributesFrom - copy all additional attributes (those not needed to
OpenPOWER on IntegriCloud