diff --git a/lib/Target/PIC16/PIC16.h b/lib/Target/PIC16/PIC16.h index cee55f4f260..08bb3e6f055 100644 --- a/lib/Target/PIC16/PIC16.h +++ b/lib/Target/PIC16/PIC16.h @@ -58,13 +58,10 @@ namespace PIC16CC { ESNames() {} public: ~ESNames() { - std::vector::iterator it = stk.end(); - it--; - while(stk.end() != stk.begin()) + while (!stk.empty()) { - char* p = *it; + char* p = stk.back(); delete [] p; - it--; stk.pop_back(); } }