summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LexicalScopes.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-11-20 00:54:28 +0000
committerEric Christopher <echristo@gmail.com>2013-11-20 00:54:28 +0000
commitb88a94faaab2234d7da660a577b612754ecb9897 (patch)
treed49a6e36591cbdf4aecfc4617dfcacc79ddf85f1 /lib/CodeGen/LexicalScopes.cpp
parent1f12b50b83acd277a62aaa6372d56a9334a03fe0 (diff)
downloadllvm-b88a94faaab2234d7da660a577b612754ecb9897.tar.gz
llvm-b88a94faaab2234d7da660a577b612754ecb9897.tar.bz2
llvm-b88a94faaab2234d7da660a577b612754ecb9897.tar.xz
Remove capability for polymorphic destruction from LexicalScope
and LexicalScopes, we're not using it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LexicalScopes.cpp')
-rw-r--r--lib/CodeGen/LexicalScopes.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/CodeGen/LexicalScopes.cpp b/lib/CodeGen/LexicalScopes.cpp
index 006db6ccc9..e58145826f 100644
--- a/lib/CodeGen/LexicalScopes.cpp
+++ b/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<InsnRange, 4> MIRanges;
DenseMap<const MachineInstr *, LexicalScope *> 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