Skip to content

Commit 25c0a5a

Browse files
authored
[lldb] Fix build warnings of unhandled SPIRV builtin types (#7978)
These types are introduced in #1945 This PR fix following build warnings: ``` [3204/3298] Building CXX object tools/lldb/source/Plugins/TypeSystem/Clang/CMakeFiles/lldbPluginTypeSystemClang.dir/TypeSystemClang.cpp.o lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp: In member function ‘virtual lldb::Encoding lldb_private::TypeSystemClang::GetEncoding(lldb::opaque_compiler_type_t, uint64_t&)’: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage1dRO’ not handled in switch [-Wswitch] switch (llvm::cast<clang::BuiltinType>(qual_type)->getKind()) { ^ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage1dArrayRO’ not handled in switch [-Wswitch] lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage1dBufferRO’ not handled in switch [-Wswitch] lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage2dRO’ not handled in switch [-Wswitch] lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage2dArrayRO’ not handled in switch [-Wswitch] lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage2dDepthRO’ not handled in switch [-Wswitch] lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage2dArrayDepthRO’ not handled in switch [-Wswitch] lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage2dMSAARO’ not handled in switch [-Wswitch] lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage2dArrayMSAARO’ not handled in switch [-Wswitch] lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage2dMSAADepthRO’ not handled in switch [-Wswitch] lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage2dArrayMSAADepthRO’ not handled in switch [-Wswitch] lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4829:12: warning: enumeration value ‘SampledOCLImage3dRO’ not handled in switch [-Wswitch] ```
1 parent 18a35b7 commit 25c0a5a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4966,6 +4966,21 @@ lldb::Encoding TypeSystemClang::GetEncoding(lldb::opaque_compiler_type_t type,
49664966
case clang::BuiltinType::OCLIntelSubgroupAVCImeDualRefStreamin:
49674967
break;
49684968

4969+
// SPIRV builtin types.
4970+
case clang::BuiltinType::SampledOCLImage1dRO:
4971+
case clang::BuiltinType::SampledOCLImage1dArrayRO:
4972+
case clang::BuiltinType::SampledOCLImage1dBufferRO:
4973+
case clang::BuiltinType::SampledOCLImage2dRO:
4974+
case clang::BuiltinType::SampledOCLImage2dArrayRO:
4975+
case clang::BuiltinType::SampledOCLImage2dDepthRO:
4976+
case clang::BuiltinType::SampledOCLImage2dArrayDepthRO:
4977+
case clang::BuiltinType::SampledOCLImage2dMSAARO:
4978+
case clang::BuiltinType::SampledOCLImage2dArrayMSAARO:
4979+
case clang::BuiltinType::SampledOCLImage2dMSAADepthRO:
4980+
case clang::BuiltinType::SampledOCLImage2dArrayMSAADepthRO:
4981+
case clang::BuiltinType::SampledOCLImage3dRO:
4982+
break;
4983+
49694984
// PowerPC -- Matrix Multiply Assist
49704985
case clang::BuiltinType::VectorPair:
49714986
case clang::BuiltinType::VectorQuad:

0 commit comments

Comments
 (0)