Revert "NVPTX: remove another raw delete call"

This reverts commit r216364.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dylan Noblesmith 2014-08-26 02:03:35 +00:00
parent ae65d0e330
commit ce0adaab88

View File

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