[PATCH] D31981: Fix compiler error in Attributes.cpp

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 15:57:23 PDT 2017


kzhuravl updated this revision to Diff 95047.
kzhuravl retitled this revision from "Fix warning in Attributes.cpp" to "Fix compiler error in Attributes.cpp".
kzhuravl added a comment.

Address review feedback.


https://reviews.llvm.org/D31981

Files:
  lib/IR/Attributes.cpp


Index: lib/IR/Attributes.cpp
===================================================================
--- lib/IR/Attributes.cpp
+++ lib/IR/Attributes.cpp
@@ -539,7 +539,8 @@
 }
 
 std::pair<unsigned, Optional<unsigned>> AttributeSet::getAllocSizeArgs() const {
-  return SetNode ? SetNode->getAllocSizeArgs() : std::make_pair(0, 0);
+  return SetNode ? SetNode->getAllocSizeArgs()
+                 : std::pair<unsigned, Optional<unsigned>>(0, 0);
 }
 
 std::string AttributeSet::getAsString(bool InAttrGrp) const {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31981.95047.patch
Type: text/x-patch
Size: 511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170412/88914b25/attachment.bin>


More information about the llvm-commits mailing list