[PATCH] D32647: [ELF] - Do not produce duplicate values in .gdb_index's constant pool area.
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu May 4 14:10:37 PDT 2017
> +# REQUIRES: x86
> +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
> +# RUN: ld.lld --gdb-index -e main %t.o -o %t
Why do you need "-e main"?
> Index: ELF/SyntheticSections.h
> ===================================================================
> --- ELF/SyntheticSections.h
> +++ ELF/SyntheticSections.h
> @@ -25,6 +25,7 @@
> #include "GdbIndex.h"
> #include "InputSection.h"
> #include "llvm/ADT/MapVector.h"
> +#include "llvm/ADT/SetVector.h"
> #include "llvm/MC/StringTableBuilder.h"
>
> namespace lld {
> @@ -511,7 +512,7 @@
> GdbHashTab SymbolTable;
>
> // The CU vector portion of the constant pool.
> - std::vector<std::vector<std::pair<uint32_t, uint8_t>>> CuVectors;
> + std::vector<llvm::SmallSetVector<uint32_t, 8>> CuVectors;
Why Small? These are normally good for stack variables, but are actually
pretty big.
LGTM with these nits fixed.
Cheers,
Rafael
More information about the llvm-commits
mailing list