NVPTX: remove another raw delete call

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dylan Noblesmith
2014-08-25 01:59:32 +00:00
parent 0280c4c7a7
commit f0d9f33437

View File

@@ -1063,7 +1063,7 @@ bool NVPTXAsmPrinter::doFinalization(Module &M) {
Module::GlobalListType &global_list = M.getGlobalList(); Module::GlobalListType &global_list = M.getGlobalList();
int i, n = global_list.size(); int i, n = global_list.size();
GlobalVariable **gv_array = new GlobalVariable *[n]; std::vector<GlobalVariable *> gv_array(n);
// first, back-up GlobalVariable in gv_array // first, back-up GlobalVariable in gv_array
i = 0; i = 0;
@@ -1083,8 +1083,6 @@ bool NVPTXAsmPrinter::doFinalization(Module &M) {
global_list.insert(global_list.end(), gv_array[i]); global_list.insert(global_list.end(), gv_array[i]);
clearAnnotationCache(&M); clearAnnotationCache(&M);
delete[] gv_array;
return ret; return ret;
//bool Result = AsmPrinter::doFinalization(M); //bool Result = AsmPrinter::doFinalization(M);