]> granicus.if.org Git - llvm/commitdiff
[NVPTX] Fix use-after-stack-free bug in InstCombineCalls.
authorJustin Lebar <jlebar@google.com>
Fri, 27 Jan 2017 01:49:39 +0000 (01:49 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 27 Jan 2017 01:49:39 +0000 (01:49 +0000)
Introduced in r293244.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293251 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineCalls.cpp

index 8e1e1c58a3b85316c541e0517276f3bf71478939..8109441eec99e4a5ffd318e5f1b35a135cafa5bf 100644 (file)
@@ -1717,7 +1717,7 @@ static Instruction *SimplifyNVVMIntrinsic(IntrinsicInst *II, InstCombiner &IC) {
     SmallVector<Value *, 4> Args(II->arg_operands());
     // All the target-generic intrinsics currently of interest to us have one
     // type argument, equal to that of the nvvm intrinsic's argument.
-    ArrayRef<Type *> Tys = {II->getArgOperand(0)->getType()};
+    Type *Tys[] = {II->getArgOperand(0)->getType()};
     return CallInst::Create(
         Intrinsic::getDeclaration(II->getModule(), *Action.IID, Tys), Args);
   }