Author: gclayton
Date: Tue Nov 3 17:23:22 2015
New Revision: 252012
URL: http://llvm.org/viewvc/llvm-project?rev=252012&view=rev
Log:
Fix __fp16 types so we can display them and use them in expressions.
I am not adding a test case for this since I don't know how portable the __fp16
type is between compilers and I don't want to break the test suite.
<rdar://problem/22375079>
Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=252012&r1=252011&r2=252012&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Tue Nov 3 17:23:22 2015
@@ -785,6 +785,8 @@ ClangASTContext::GetBuiltinTypeForEncodi
return CompilerType (ast, ast->DoubleTy);
if (QualTypeMatchesBitSize (bit_size, ast, ast->LongDoubleTy))
return CompilerType (ast, ast->LongDoubleTy);
+ if (QualTypeMatchesBitSize (bit_size, ast, ast->HalfTy))
+ return CompilerType (ast, ast->HalfTy);
break;
case eEncodingVector:
@@ -1071,6 +1073,8 @@ ClangASTContext::GetBuiltinTypeForDWARFE
return CompilerType (ast, ast->DoubleTy);
if (QualTypeMatchesBitSize (bit_size, ast, ast->LongDoubleTy))
return CompilerType (ast, ast->LongDoubleTy);
+ if (QualTypeMatchesBitSize (bit_size, ast, ast->HalfTy))
+ return CompilerType (ast, ast->HalfTy);
break;
case DW_ATE_signed:
@@ -4525,6 +4529,7 @@ ClangASTContext::GetEncoding (lldb::opaq
case clang::BuiltinType::ULongLong:
case clang::BuiltinType::UInt128: return lldb::eEncodingUint;
+ case clang::BuiltinType::Half:
case clang::BuiltinType::Float:
case clang::BuiltinType::Double:
case clang::BuiltinType::LongDouble: return
lldb::eEncodingIEEE754;
@@ -4539,7 +4544,6 @@ ClangASTContext::GetEncoding (lldb::opaq
case clang::BuiltinType::Kind::BoundMember:
case clang::BuiltinType::Kind::BuiltinFn:
case clang::BuiltinType::Kind::Dependent:
- case clang::BuiltinType::Kind::Half:
case clang::BuiltinType::Kind::OCLClkEvent:
case clang::BuiltinType::Kind::OCLEvent:
case clang::BuiltinType::Kind::OCLImage1d:
@@ -4689,8 +4693,9 @@ ClangASTContext::GetFormat (lldb::opaque
case clang::BuiltinType::LongLong: return
lldb::eFormatDecimal;
case clang::BuiltinType::UInt128: return
lldb::eFormatUnsigned;
case clang::BuiltinType::Int128: return
lldb::eFormatDecimal;
- case clang::BuiltinType::Float: return lldb::eFormatFloat;
- case clang::BuiltinType::Double: return lldb::eFormatFloat;
+ case clang::BuiltinType::Half:
+ case clang::BuiltinType::Float:
+ case clang::BuiltinType::Double:
case clang::BuiltinType::LongDouble: return lldb::eFormatFloat;
default:
return lldb::eFormatHex;
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits