summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2014-05-23 08:07:09 +0000
committerSimon Atanasyan <simon@atanasyan.com>2014-05-23 08:07:09 +0000
commit84242dc774be3fae8a9a9f2712e6f37b150aeecc (patch)
tree0f3077aeea2ce77a7ad3180fcc3241d047ac59ae /clang-tools-extra
parent57dd5cf441351531d26d7255a778430904c5288d (diff)
downloadbcm5719-llvm-84242dc774be3fae8a9a9f2712e6f37b150aeecc.tar.gz
bcm5719-llvm-84242dc774be3fae8a9a9f2712e6f37b150aeecc.zip
[YAML] Add an optional argument `EnumMask` to the `yaml::IO::bitSetCase()`.
Some bit-set fields used in ELF file headers in fact contain two parts. The first one is a regular bit-field. The second one is an enumeraion. For example ELF header `e_flags` for MIPS target might contain the following values: Bit-set values: EF_MIPS_NOREORDER = 0x00000001 EF_MIPS_PIC = 0x00000002 EF_MIPS_CPIC = 0x00000004 EF_MIPS_ABI2 = 0x00000020 Enumeration: EF_MIPS_ARCH_32 = 0x50000000 EF_MIPS_ARCH_64 = 0x60000000 EF_MIPS_ARCH_32R2 = 0x70000000 EF_MIPS_ARCH_64R2 = 0x80000000 For printing bit-sets we use the `yaml::IO::bitSetCase()`. It does not support bit-set/enumeration combinations and prints too many flags from an enumeration part. This patch fixes this problem. New method `yaml::IO::maskedBitSetCase()` handle "enumeration" part of bitset defined by provided mask. Patch reviewed by Nick Kledzik and Sean Silva. llvm-svn: 209504
Diffstat (limited to 'clang-tools-extra')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud