[llvm] 50a6aa6 - [llvm][utils] Fix handling of llvm::None
Dave Lee via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 29 17:44:04 PDT 2021
Author: Dave Lee
Date: 2021-03-29T17:43:53-07:00
New Revision: 50a6aa6c0f6d73c7354d2f7f44f56a79022ee658
URL: https://github.com/llvm/llvm-project/commit/50a6aa6c0f6d73c7354d2f7f44f56a79022ee658
DIFF: https://github.com/llvm/llvm-project/commit/50a6aa6c0f6d73c7354d2f7f44f56a79022ee658.diff
LOG: [llvm][utils] Fix handling of llvm::None
Added:
Modified:
llvm/utils/lldbDataFormatters.py
Removed:
################################################################################
diff --git a/llvm/utils/lldbDataFormatters.py b/llvm/utils/lldbDataFormatters.py
index 4dff5b0a9f49..4fc420ff997d 100644
--- a/llvm/utils/lldbDataFormatters.py
+++ b/llvm/utils/lldbDataFormatters.py
@@ -120,7 +120,8 @@ def GetOptionalValue(valobj):
return storage.Cast(underlying_type)
def OptionalSummaryProvider(valobj, internal_dict):
- return GetOptionalValue(valobj).summary
+ val = GetOptionalValue(valobj)
+ return val.summary if val else 'None'
class OptionalSynthProvider:
"""Provides deref support to llvm::Optional<T>"""
More information about the llvm-commits
mailing list