diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-19 21:30:48 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-19 21:30:48 +0000 |
commit | 7fd74acd0bd1cef0e1758ae4bdf57bad6fa8c7aa (patch) | |
tree | 13936e7d9cff8a36215568fe68f0754cd99d2499 /clang/lib/CodeGen/CGLoopInfo.cpp | |
parent | 7d82313bcd972be7a125dd9448a807eb100a520d (diff) | |
download | bcm5719-llvm-7fd74acd0bd1cef0e1758ae4bdf57bad6fa8c7aa.tar.gz bcm5719-llvm-7fd74acd0bd1cef0e1758ae4bdf57bad6fa8c7aa.zip |
CodeGen: Update LoopAttributes for LLVM API change
`MDNode::getTemporary()` returns a `unique_ptr<>` as of r226504.
llvm-svn: 226505
Diffstat (limited to 'clang/lib/CodeGen/CGLoopInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGLoopInfo.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGLoopInfo.cpp b/clang/lib/CodeGen/CGLoopInfo.cpp index 89f43c28159..011ae7e836a 100644 --- a/clang/lib/CodeGen/CGLoopInfo.cpp +++ b/clang/lib/CodeGen/CGLoopInfo.cpp @@ -26,8 +26,8 @@ static MDNode *createMetadata(LLVMContext &Ctx, const LoopAttributes &Attrs) { SmallVector<Metadata *, 4> Args; // Reserve operand 0 for loop id self reference. - MDNode *TempNode = MDNode::getTemporary(Ctx, None); - Args.push_back(TempNode); + auto TempNode = MDNode::getTemporary(Ctx, None); + Args.push_back(TempNode.get()); // Setting vectorizer.width if (Attrs.VectorizerWidth > 0) { @@ -58,7 +58,6 @@ static MDNode *createMetadata(LLVMContext &Ctx, const LoopAttributes &Attrs) { // Set the first operand to itself. MDNode *LoopID = MDNode::get(Ctx, Args); LoopID->replaceOperandWith(0, LoopID); - MDNode::deleteTemporary(TempNode); return LoopID; } |