summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Plugins/Language/ObjC/Cocoa.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Language/ObjC/Cocoa.cpp b/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
index 4aa3e0b2d15..d34b78bae53 100644
--- a/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
+++ b/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
@@ -773,8 +773,7 @@ static uint64_t decodeExponent(uint64_t exp) {
int64_t exp7 = exp;
// Tagged exponent field is 7-bit signed. Sign-extend the value to 64 bits
// before performing arithmetic.
- int64_t exp11 = ((exp7 << 57) >> 57) + TAGGED_DATE_EXPONENT_BIAS;
- return exp11;
+ return llvm::SignExtend64<7>(exp) + TAGGED_DATE_EXPONENT_BIAS;
}
static uint64_t decodeTaggedTimeInterval(uint64_t encodedTimeInterval) {
OpenPOWER on IntegriCloud