diff options
| author | Konstantin Zhuravlyov <kzhuravl_dev@outlook.com> | 2017-04-12 23:57:37 +0000 |
|---|---|---|
| committer | Konstantin Zhuravlyov <kzhuravl_dev@outlook.com> | 2017-04-12 23:57:37 +0000 |
| commit | 6df95b7c45fe49916b5312d8ad218c332df8cd9a (patch) | |
| tree | ee17abfd32f7fda66e2c6c29b77072611acfaddf | |
| parent | 74da350b850efd10643ce9b76043e0e9df59a1b2 (diff) | |
| download | bcm5719-llvm-6df95b7c45fe49916b5312d8ad218c332df8cd9a.tar.gz bcm5719-llvm-6df95b7c45fe49916b5312d8ad218c332df8cd9a.zip | |
Fix compiler error in Attributes.cpp
```
Compiling Attributes.cpp ...
../../../Attributes.cpp: In member function 'std::__1::pair<unsigned int, llvm::Optional<unsigned int> > llvm::AttributeSet::getAllocSizeArgs() const':
../../../Attributes.cpp:542:69: error: operands to ?: have different types 'std::__1::pair<unsigned int, llvm::Optional<unsigned int> >' and 'std::__1::pair<int, int>'
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
llvm-svn: 300143
| -rw-r--r-- | llvm/lib/IR/Attributes.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index a62afe9dd2e..7faac60208f 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -539,7 +539,8 @@ uint64_t AttributeSet::getDereferenceableOrNullBytes() const { } 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 { |

