mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Threading] Use llvm::Optional<> rather than making a zero lower bound special.
While most systems aren't going to have their stack bottom at zero, using llvm::Optional<> here is cleaner. rdar://90776105
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
#ifndef SWIFT_THREADING_THREAD_H
|
||||
#define SWIFT_THREADING_THREAD_H
|
||||
|
||||
#include "llvm/ADT/Optional.h"
|
||||
|
||||
#include "Impl.h"
|
||||
|
||||
namespace swift {
|
||||
@@ -68,7 +70,7 @@ public:
|
||||
}
|
||||
|
||||
// Retrieve the bounds of the current thread's stack
|
||||
static StackBounds stackBounds() {
|
||||
static llvm::Optional<StackBounds> stackBounds() {
|
||||
return threading_impl::thread_get_current_stack_bounds();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user