projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88c0ed3
)
Fixing the build for compilers which do not yet have support for constexpr functions...
author
Aaron Ballman
<aaron@aaronballman.com>
Mon, 29 Sep 2014 20:27:01 +0000
(20:27 +0000)
committer
Aaron Ballman
<aaron@aaronballman.com>
Mon, 29 Sep 2014 20:27:01 +0000
(20:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218622
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/Optional.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/Optional.h
b/include/llvm/ADT/Optional.h
index 144367d352d546f131739ec24b9be3ac87830cf7..0386e57f05f44b8f86010e3b59dbe9102312a2b9 100644
(file)
--- a/
include/llvm/ADT/Optional.h
+++ b/
include/llvm/ADT/Optional.h
@@
-120,7
+120,7
@@
public:
T& operator*() LLVM_LVALUE_FUNCTION { assert(hasVal); return *getPointer(); }
template <typename U>
-
constexpr
T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION {
+
LLVM_CONSTEXPR
T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION {
return hasValue() ? getValue() : std::forward<U>(value);
}