Provide some free functions to reduce verbosity of endian-writing
a single value, and replace the endianness template parameter with
a field.
Part of PR37466.
Paths
| Differential D47032
Support: Simplify endian stream interface. NFCI. ClosedPublic Authored by pcc on May 17 2018, 2:44 PM.
Details Summary Provide some free functions to reduce verbosity of endian-writing Part of PR37466.
Diff Detail
Event TimelineComment Actions LGTM If I were to design this from scratch, I'd perhaps define two classes, LEWriter and BEWriter, instead of giving the endianness as an argument. But that's an off-topic. This revision is now accepted and ready to land.May 18 2018, 11:15 AM Comment Actions
Maybe, but it will need to be an argument in a few other places, such as ELFObjectWriter (see D47040). Though maybe we could somehow template it on ELFT as we do in lld... but that's another separate discussion. Closed by commit rLLD332757: Support: Simplify endian stream interface. NFCI. (authored by pcc). · Explain WhyMay 18 2018, 12:50 PM This revision was automatically updated to reflect the committed changes. Comment Actions Note that the endianness values can be passed in to the llvm functions at It’s a shame this object hierarchy was developed separately from the
Revision Contents
Diff 147396 clang/lib/Frontend/CacheTokens.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/lib/Serialization/GlobalModuleIndex.cpp
clang/lib/Serialization/MultiOnDiskHashTable.h
lld/wasm/WriterUtils.cpp
llvm/include/llvm/MC/MCObjectWriter.h
llvm/include/llvm/Support/EndianStream.h
llvm/include/llvm/Support/OnDiskHashTable.h
llvm/lib/MC/ELFObjectWriter.cpp
llvm/lib/MC/MCCodeView.cpp
llvm/lib/MC/MCDwarf.cpp
llvm/lib/Object/ArchiveWriter.cpp
llvm/lib/ProfileData/InstrProfWriter.cpp
llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp
llvm/lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp
llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp
llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp
llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp
llvm/tools/llvm-xray/xray-converter.cpp
llvm/unittests/Support/EndianStreamTest.cpp
|