1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/unittests
Pavel Labath aa70828a6f [Support/Endian] Add support for endian-specific enums
Summary:
Binary formats often include various enumerations or bitsets, but using
endian-specific types for accessing them is tricky because they
currently only support integral types. This is particularly true for
scoped enums (enum class), as these are not implicitly convertible to
integral types, and so one has to perform two casts just to read the
enum value.

This fixes that support by adding first-class support for enumeration
types to endian-specific types. The support for them was already almost
working -- all I needed to do was overload getSwappedBytes for
enumeration types (which casts the enum to its underlying type and performs the
conversion there). I also add some convenience template aliases to simplify
declaring endian-specific enums.

Reviewers: Bigcheese, zturner

Subscribers: kristina, llvm-commits

Tags: #llvm

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

llvm-svn: 355812
2019-03-11 09:06:18 +00:00
..
ADT Add partial implementation of std::to_address() as llvm::to_address() 2019-02-20 18:08:48 +00:00
Analysis [ValueTracking] Known bits support for unsigned saturating add/sub 2019-03-01 20:07:04 +00:00
AsmParser Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BinaryFormat Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Bitcode Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
CodeGen [Subtarget] Merge ProcSched and ProcDesc arrays in MCSubtargetInfo into a single array. 2019-03-05 18:54:38 +00:00
DebugInfo [DWARFFormValue] Cleanup DWARFFormValue interface. (NFC) 2019-02-27 00:58:09 +00:00
Demangle Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
ExecutionEngine [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
FuzzMutate Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IR [IR][ARM] Add function pointer alignment to datalayout 2019-03-08 10:44:06 +00:00
LineEditor Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Linker [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
MC Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MI MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:13 +00:00
Object Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ObjectYAML Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Option Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Passes Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProfileData [PGO] Context sensitive PGO (part 2) 2019-02-28 19:55:07 +00:00
Remarks [OptRemarks] Make OptRemarks more generic: rename OptRemarks to Remarks 2019-03-05 20:45:17 +00:00
Support [Support/Endian] Add support for endian-specific enums 2019-03-11 09:06:18 +00:00
Target [WebAssembly] Exception handling: Switch to the new proposal 2019-01-30 03:21:57 +00:00
TextAPI Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
tools [DebugInfo] add SectionedAddress to DebugInfo interfaces. 2019-02-27 13:17:36 +00:00
Transforms BreakCriticalEdges: Update PostDominatorTree 2019-02-22 15:01:41 +00:00
XRay Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [OptRemarks] Make OptRemarks more generic: rename OptRemarks to Remarks 2019-03-05 20:45:17 +00:00
unittest.cfg.in Add support for unittest inputs. 2018-09-05 23:30:17 +00:00