From: Owen Anderson Date: Sun, 28 Dec 2008 21:57:02 +0000 (+0000) Subject: Forgot to commit this file. X-Git-Tag: android-x86-6.0-r1~1047^2~16670 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=bec0552536297dfd83720e48e1fd26e1414e7b53;p=android-x86%2Fexternal-llvm.git Forgot to commit this file. Add a clear() method to remove all ranges and value numbers for a live interval. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61459 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 880d541e50b..86aada3b80a 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -145,6 +145,16 @@ namespace llvm { while (I->end <= Pos) ++I; return I; } + + void clear() { + while (!valnos.empty()) { + VNInfo *VNI = valnos.back(); + valnos.pop_back(); + VNI->~VNInfo(); + } + + ranges.clear(); + } /// isStackSlot - Return true if this is a stack slot interval. ///