This is an archive of the discontinued LLVM Phabricator instance.

[SPIRV] Fix build warnings
ClosedPublic

Authored by foad on Jan 25 2023, 4:04 AM.

Details

Summary

Fix these build warnings:

SPIRVBuiltins.cpp:1590:30: warning: 'getPrefTypeAlignment' is deprecated: use getPrefTypeAlign instead [-Wdeprecated-declarations]
SPIRVUtils.cpp:209:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]

Diff Detail

Event Timeline

foad created this revision.Jan 25 2023, 4:04 AM
foad requested review of this revision.Jan 25 2023, 4:04 AM
Herald added a project: Restricted Project. · View Herald Transcript
arsenm accepted this revision.Jan 25 2023, 5:16 AM
arsenm added a subscriber: arsenm.
arsenm added inline comments.
llvm/lib/Target/SPIRV/SPIRVUtils.cpp
211

I think MSVC is unhappy if you don't put an unreachable after a covered switch

This revision is now accepted and ready to land.Jan 25 2023, 5:16 AM
This revision was automatically updated to reflect the committed changes.