diff options
author | Georgii Rymar <grimar@accesssoftek.com> | 2020-12-14 18:04:45 +0300 |
---|---|---|
committer | Georgii Rymar <grimar@accesssoftek.com> | 2020-12-15 10:56:25 +0300 |
commit | 83aea14ed6118c810e4ed2966bc34db9b42cb049 (patch) | |
tree | 2206710969fdf754bfcfd73bbb5d43f74a470b97 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 8b330f1f6919a2ac85eeda753ad8d1090468e23f (diff) | |
download | llvm-83aea14ed6118c810e4ed2966bc34db9b42cb049.zip llvm-83aea14ed6118c810e4ed2966bc34db9b42cb049.tar.gz llvm-83aea14ed6118c810e4ed2966bc34db9b42cb049.tar.bz2 |
[llvm-readelf] - Don't print OS/Processor specific prefix for known ELF file types.
This is a change suggested in post commit comments for
D93096 (https://reviews.llvm.org/D93096#2451796).
Imagine we want to add a custom OS specific ELF file type.
For that we can update the `ElfObjectFileType` array:
```
static const EnumEntry<unsigned> ElfObjectFileType[] = {
...
{"Core", "CORE (Core file)", ELF::ET_CORE},
{"MyType", "MyType (my description)", 0xfe01},
};
```
The current code then might print:
```
OS Specific: (MyType (my description))
```
Though instead we probably would like to see a nicer output, e.g:
```
Type: MyType (my description)
```
To achieve that we can reorder the code slightly.
It is impossible to add a test I think, because we have no custom values in
the `ElfObjectFileType` array in LLVM.
Differential revision: https://reviews.llvm.org/D93217
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions