aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2018-09-04 14:39:56 +0000
committerSam McCall <sam.mccall@gmail.com>2018-09-04 14:39:56 +0000
commitb0138317d6aa9bb596cf067b6c0ab4e705e8774e (patch)
tree78dd375e82e9c4eafa9b0c3b585416cf20848c1c /llvm/lib/Object/MachOObjectFile.cpp
parentd5554c512de686a1c158370fe264648f079b89a2 (diff)
downloadllvm-b0138317d6aa9bb596cf067b6c0ab4e705e8774e.zip
llvm-b0138317d6aa9bb596cf067b6c0ab4e705e8774e.tar.gz
llvm-b0138317d6aa9bb596cf067b6c0ab4e705e8774e.tar.bz2
[clangd] SymbolOccurrences -> Refs and cleanup
Summary: A few things that I noticed while merging the SwapIndex patch: - SymbolOccurrences and particularly SymbolOccurrenceSlab are unwieldy names, and these names appear *a lot*. Ref, RefSlab, etc seem clear enough and read/format much better. - The asymmetry between SymbolSlab and RefSlab (build() vs freeze()) is confusing and irritating, and doesn't even save much code. Avoiding RefSlab::Builder was my idea, but it was a bad one; add it. - DenseMap<SymbolID, ArrayRef<Ref>> seems like a reasonable compromise for constructing MemIndex - and means many less wasted allocations than the current DenseMap<SymbolID, vector<Ref*>> for FileIndex, and none for slabs. - RefSlab::find() is not actually used for anything, so we can throw away the DenseMap and keep the representation much more compact. - A few naming/consistency fixes: e.g. Slabs,Refs -> Symbols,Refs. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, mgrang, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D51605 llvm-svn: 341368
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions