Refactor symbol version assignmnt code.
authorRui Ueyama <ruiu@google.com>
Tue, 15 Nov 2016 18:41:52 +0000 (18:41 +0000)
committerRui Ueyama <ruiu@google.com>
Tue, 15 Nov 2016 18:41:52 +0000 (18:41 +0000)
commit82492142998cc18b1a360de8f2177b5535a80102
tree5091fdf6ff7373206e49437cb4f155ee727680b1
parent8693adfd4669a9080d12ca42a4c9ab8661be6062
Refactor symbol version assignmnt code.

The code to handle symbol versions is getting tricky and hard to
understand, so it is probably time to simplify it. This patch does
the following.

 - Add `DemangledSyms` variable to SymbolTable so that we don't
   need to pass it around to findDemangled.
 - Define `initDemangledSyms` to initialize the variable lazily.
 - hasExternCpp is removed because we no longer have to initialize
   the map eagerly.
 - scanScriptVersion is split.
 - Comments are updated.

llvm-svn: 287002
lld/ELF/SymbolTable.cpp
lld/ELF/SymbolTable.h