================
@@ -2015,21 +2015,92 @@ static std::optional<clang::APValue> MakeAPValue(const 
clang::ASTContext &ast,
     return std::nullopt;
 
   bool is_signed = false;
-  const bool is_integral = clang_type.IsIntegerOrEnumerationType(is_signed);
 
-  llvm::APSInt apint(*bit_width, !is_signed);
-  apint = value;
-
-  if (is_integral)
+  if (clang_type.IsIntegerOrEnumerationType(is_signed) ||
+      clang_type.IsMemberDataPointerType()) {
+    llvm::APSInt apint(*bit_width, !is_signed);
+    apint = value;
     return clang::APValue(apint);
+  }
 
   // FIXME: we currently support a limited set of floating point types.
   // E.g., 16-bit floats are not supported.
-  if (!clang_type.IsRealFloatingPointType())
-    return std::nullopt;
+  if (clang_type.IsRealFloatingPointType()) {
+    llvm::APInt apint(*bit_width, value);
+    return clang::APValue(llvm::APFloat(
+        ast.getFloatTypeSemantics(ClangUtil::GetQualType(clang_type)), apint));
+  }
+
+  LLDB_LOG(GetLog(LLDBLog::Types),
+           "MakeAPValue: Unsupported NTTP type class: {0}",
+           clang_type.GetTypeClass());
----------------
clayborg wrote:

What does NTTP stand for? I looked up the acronym and found nothing that 
matches?

https://github.com/llvm/llvm-project/pull/187598
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to