From b7dee8a606496d52f02b7e9523487fcb89ae90de Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 20 Nov 2013 00:54:28 +0000 Subject: Remove capability for polymorphic destruction from LexicalScope and LexicalScopes, we're not using it. llvm-svn: 195182 --- llvm/lib/CodeGen/LexicalScopes.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'llvm/lib/CodeGen/LexicalScopes.cpp') diff --git a/llvm/lib/CodeGen/LexicalScopes.cpp b/llvm/lib/CodeGen/LexicalScopes.cpp index 006db6ccc9e..e58145826ff 100644 --- a/llvm/lib/CodeGen/LexicalScopes.cpp +++ b/llvm/lib/CodeGen/LexicalScopes.cpp @@ -25,10 +25,11 @@ #include "llvm/Support/FormattedStream.h" using namespace llvm; -LexicalScopes::~LexicalScopes() { releaseMemory(); } +/// ~LexicalScopes - final cleanup after ourselves. +LexicalScopes::~LexicalScopes() { reset(); } -/// releaseMemory - release memory. -void LexicalScopes::releaseMemory() { +/// reset - Reset the instance so that it's prepared for another function. +void LexicalScopes::reset() { MF = NULL; CurrentFnLexicalScope = NULL; DeleteContainerSeconds(LexicalScopeMap); @@ -39,7 +40,7 @@ void LexicalScopes::releaseMemory() { /// initialize - Scan machine function and constuct lexical scope nest. void LexicalScopes::initialize(const MachineFunction &Fn) { - releaseMemory(); + reset(); MF = &Fn; SmallVector MIRanges; DenseMap MI2ScopeMap; @@ -311,8 +312,6 @@ bool LexicalScopes::dominates(DebugLoc DL, MachineBasicBlock *MBB) { return Result; } -void LexicalScope::anchor() {} - /// dump - Print data structures. void LexicalScope::dump(unsigned Indent) const { #ifndef NDEBUG -- cgit v1.2.3