summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDylan Noblesmith <nobled@dreamwidth.org>2014-08-26 02:03:35 +0000
committerDylan Noblesmith <nobled@dreamwidth.org>2014-08-26 02:03:35 +0000
commitc9e2a2709e8dbb753ed2f1feb6eae95130d271a8 (patch)
tree851cebde1ccd6a9f27971bc9ccc61b53fc8f9682 /llvm/lib
parent4e69e29a72a1ffcbf755f13ed909b51cfbcafd60 (diff)
downloadbcm5719-llvm-c9e2a2709e8dbb753ed2f1feb6eae95130d271a8.tar.gz
bcm5719-llvm-c9e2a2709e8dbb753ed2f1feb6eae95130d271a8.zip
Revert "NVPTX: remove another raw delete call"
This reverts commit r216364. llvm-svn: 216430
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index 39ae9bbf640..1264b25b04b 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -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);
OpenPOWER on IntegriCloud