From fae6220cbbfa9fff5093581cc343a6c42cac31a9 Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Wed, 12 Apr 2017 23:57:37 +0000 Subject: [PATCH] Fix compiler error in Attributes.cpp ``` Compiling Attributes.cpp ... ../../../Attributes.cpp: In member function 'std::__1::pair > llvm::AttributeSet::getAllocSizeArgs() const': ../../../Attributes.cpp:542:69: error: operands to ?: have different types 'std::__1::pair >' and 'std::__1::pair' return SetNode ? SetNode->getAllocSizeArgs() : std::make_pair(0, 0); ^ ../../../Attributes.cpp:543:1: error: control reaches end of non-void function [-Werror=return-type] } ^ ``` Differential Revision: https://reviews.llvm.org/D31981 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300143 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/Attributes.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index a62afe9dd2e..7faac60208f 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -539,7 +539,8 @@ uint64_t AttributeSet::getDereferenceableOrNullBytes() const { } std::pair> AttributeSet::getAllocSizeArgs() const { - return SetNode ? SetNode->getAllocSizeArgs() : std::make_pair(0, 0); + return SetNode ? SetNode->getAllocSizeArgs() + : std::pair>(0, 0); } std::string AttributeSet::getAsString(bool InAttrGrp) const { -- 2.50.1