aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-31 01:05:46 +0000
committerChris Lattner <sabre@nondot.org>2009-12-31 01:05:46 +0000
commitb76359e36e75dfe16c5153c3cac903efbb2cd8d7 (patch)
tree289a79ca7ed2cd8b1bf9563b0a473e435aef5654 /lib/Analysis
parentcc7b011728b9e8c3574247b81f79689840b3d33a (diff)
downloadexternal_llvm-b76359e36e75dfe16c5153c3cac903efbb2cd8d7.zip
external_llvm-b76359e36e75dfe16c5153c3cac903efbb2cd8d7.tar.gz
external_llvm-b76359e36e75dfe16c5153c3cac903efbb2cd8d7.tar.bz2
Optimize MDNode to coallocate the operand list immediately
after the MDNode in memory. This eliminates the operands pointer and saves a new[] per node. Note that the code in DIDerivedType::replaceAllUsesWith is wrong and quite scary. A MDNode should not be RAUW'd with something else: this changes all uses of the mdnode, which may not be debug info related! Debug info should use something non-mdnode for declarations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92321 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DebugInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 5fb3efe..0dfffc8 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -284,7 +284,7 @@ void DIDerivedType::replaceAllUsesWith(DIDescriptor &D) {
if (getNode() != D.getNode()) {
MDNode *Node = DbgNode;
Node->replaceAllUsesWith(D.getNode());
- delete Node;
+ Node->destroy();
}
}