diff options
| author | Yonghong Song <yhs@fb.com> | 2019-03-27 15:45:27 +0000 |
|---|---|---|
| committer | Yonghong Song <yhs@fb.com> | 2019-03-27 15:45:27 +0000 |
| commit | 6c56edfe420dbd298d1487ac5a6b68fc94141030 (patch) | |
| tree | b4a6e489fd5b47e63fd1de601cad08b6e64a3ca8 /llvm/lib/CodeGen/TargetRegisterInfo.cpp | |
| parent | 678d128b5ab6e43582ae642c011b9173607bdb8a (diff) | |
| download | bcm5719-llvm-6c56edfe420dbd298d1487ac5a6b68fc94141030.tar.gz bcm5719-llvm-6c56edfe420dbd298d1487ac5a6b68fc94141030.zip | |
[BPF] use std::map to ensure consistent output
The .BTF.ext FuncInfoTable and LineInfoTable contain
information organized per ELF section. Current definition
of FuncInfoTable/LineInfoTable is:
std::unordered_map<uint32_t, std::vector<BTFFuncInfo>> FuncInfoTable
std::unordered_map<uint32_t, std::vector<BTFLineInfo>> LineInfoTable
where the key is the section name off in the string table.
The unordered_map may cause the order of section output
different for different platforms.
The same for unordered map definition of
std::unordered_map<std::string, std::unique_ptr<BTFKindDataSec>>
DataSecEntries
where BTF_KIND_DATASEC entries may have different ordering
for different platforms.
This patch fixed the issue by using std::map.
Test static-var-derived-type.ll is modified to generate two
DataSec's which will ensure the ordering is the same for all
supported platforms.
Signed-off-by: Yonghong Song <yhs@fb.com>
llvm-svn: 357077
Diffstat (limited to 'llvm/lib/CodeGen/TargetRegisterInfo.cpp')
0 files changed, 0 insertions, 0 deletions

