[polly] r226506 - CodeGen: Update IRBuilder for LLVM API change
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Jan 19 13:31:48 PST 2015
Author: dexonsmith
Date: Mon Jan 19 15:31:48 2015
New Revision: 226506
URL: http://llvm.org/viewvc/llvm-project?rev=226506&view=rev
Log:
CodeGen: Update IRBuilder for LLVM API change
`MDNode::getTemporary()` returns a `unique_ptr<>` as of r226504.
Modified:
polly/trunk/lib/CodeGen/IRBuilder.cpp
Modified: polly/trunk/lib/CodeGen/IRBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IRBuilder.cpp?rev=226506&r1=226505&r2=226506&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IRBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IRBuilder.cpp Mon Jan 19 15:31:48 2015
@@ -35,9 +35,9 @@ static MDNode *getID(LLVMContext &Ctx, M
MDNode *ID;
SmallVector<Metadata *, 3> Args;
// Use a temporary node to safely create a unique pointer for the first arg.
- MDNode *TempNode = MDNode::getTemporary(Ctx, None);
+ auto TempNode = MDNode::getTemporary(Ctx, None);
// Reserve operand 0 for loop id self reference.
- Args.push_back(TempNode);
+ Args.push_back(TempNode.get());
if (arg0)
Args.push_back(arg0);
@@ -46,7 +46,6 @@ static MDNode *getID(LLVMContext &Ctx, M
ID = MDNode::get(Ctx, Args);
ID->replaceOperandWith(0, ID);
- MDNode::deleteTemporary(TempNode);
return ID;
}
More information about the llvm-commits
mailing list