llvm-project/llvm/lib
Hubert Tong 2711e16b35 [sanitizers] Use covering ObjectFormatType switches
Summary:
This patch removes the `default` case from some switches on
`llvm::Triple::ObjectFormatType`, and cases for the missing enumerators
(`UnknownObjectFormat`, `Wasm`, and `XCOFF`) are then added.

For `UnknownObjectFormat`, the effect of the action for the `default`
case is maintained; otherwise, where `llvm_unreachable` is called,
`report_fatal_error` is used instead.

Where the `default` case returns a default value, `report_fatal_error`
is used for XCOFF as a placeholder. For `Wasm`, the effect of the action
for the `default` case in maintained.

The code is structured to avoid strongly implying that the `Wasm` case
is present for any reason other than to make the switch cover all
`ObjectFormatType` enumerator values.

Reviewers: sfertile, jasonliu, daltenty

Reviewed By: sfertile

Subscribers: hiraditya, aheejin, sunfish, llvm-commits, cfe-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D64222

llvm-svn: 366544
2019-07-19 08:46:18 +00:00
..
Analysis [LAA] Re-check bit-width of pointers after stripping. 2019-07-18 17:30:27 +00:00
AsmParser ARM MTE stack sanitizer. 2019-07-15 20:02:23 +00:00
BinaryFormat [Object][XCOFF] Add support for 64-bit file header and section header dumping. 2019-07-09 18:09:11 +00:00
Bitcode [llvm-bcanalyzer] Fixed error 'Expected<T> must be checked before access or destruction' 2019-07-17 23:28:39 +00:00
Bitstream [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
CodeGen Use the MachineBasicBlock symbol for a callbr target 2019-07-19 01:10:28 +00:00
DebugInfo [DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame. 2019-07-19 02:03:34 +00:00
Demangle llvm-undname: Correctly demangle vararg parameters 2019-06-04 19:10:08 +00:00
ExecutionEngine [ORC] Suppress an ORCv1 deprecation warning. 2019-07-18 19:55:42 +00:00
FuzzMutate [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
Fuzzer
IR Fix typo in r366494. Spotted by Yuanfang Chen. 2019-07-18 21:03:37 +00:00
IRReader [IRReader] Expose getLazyIRModule 2019-02-11 22:01:13 +00:00
LTO Open native file handles to avoid converting from FDs, NFC 2019-07-11 20:29:32 +00:00
LineEditor [CMake] Delete redundant DEPENDS/LINK_LIBS from LineEditor/XRay 2019-06-22 01:50:21 +00:00
Linker Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
MC [DebugInfo] Some fields do not need relocations even relax is enabled. 2019-07-19 06:10:36 +00:00
MCA [MCA] Ignore invalid processor resource writes of zero cycles. NFCI 2019-06-14 13:31:21 +00:00
Object [DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame. 2019-07-19 02:03:34 +00:00
ObjectYAML [yaml2obj] - Allow overriding the sh_size field. 2019-07-11 12:59:29 +00:00
Option Let unaliased Args track which Alias they were created from, and use that in Arg::getAsString() for diagnostics 2019-07-09 00:34:08 +00:00
Passes hwasan: Initialize the pass only once. 2019-07-17 21:45:19 +00:00
ProfileData [Profile] Support raw/indexed profiles larger than 4GB 2019-07-09 22:01:04 +00:00
Remarks Fix -Wreturn-type warning. NFC. 2019-07-16 19:59:08 +00:00
Support FileSystem: Check for DTTOIF alone, not _DIRENT_HAVE_D_TYPE 2019-07-18 20:05:11 +00:00
TableGen TableGen: Handle nontrivial foreach range bounds 2019-05-22 21:28:20 +00:00
Target [AMDGPU] Simplify the exclusive scan used for optimized atomics 2019-07-19 08:40:37 +00:00
Testing [Testing] Move clangd::Annotations to llvm testing support 2019-04-25 10:08:31 +00:00
TextAPI Cleanup: llvm::bsearch -> llvm::partition_point after r364719 2019-06-30 11:19:56 +00:00
ToolDrivers [llvm-lib] Add a dependency to intrinsics_gen to the LLVMLibDriver build 2019-07-15 18:15:12 +00:00
Transforms [sanitizers] Use covering ObjectFormatType switches 2019-07-19 08:46:18 +00:00
WindowsManifest
XRay Open native file handles to avoid converting from FDs, NFC 2019-07-11 20:29:32 +00:00
CMakeLists.txt Fix build errors LLVM tests are disabled. 2019-07-11 22:08:35 +00:00
LLVMBuild.txt [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00