Skip to content

Commit

Permalink
NVPTX: remove another raw delete call
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216364 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
nobled committed Aug 25, 2014
1 parent 0280c4c commit f0d9f33
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/Target/NVPTX/NVPTXAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ bool NVPTXAsmPrinter::doFinalization(Module &M) {

Module::GlobalListType &global_list = M.getGlobalList();
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
i = 0;
Expand All @@ -1083,8 +1083,6 @@ 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);
Expand Down

0 comments on commit f0d9f33

Please sign in to comment.