[lld] r257212 - Add comments.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 8 14:01:33 PST 2016
Author: ruiu
Date: Fri Jan 8 16:01:33 2016
New Revision: 257212
URL: http://llvm.org/viewvc/llvm-project?rev=257212&view=rev
Log:
Add comments.
Modified:
lld/trunk/ELF/SymbolTable.cpp
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=257212&r1=257211&r2=257212&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Fri Jan 8 16:01:33 2016
@@ -150,6 +150,8 @@ ELFFileBase<ELFT> *SymbolTable<ELFT>::fi
return nullptr;
}
+// Construct a string in the form of "Sym in File1 and File2".
+// Used to construct an error message.
template <class ELFT>
std::string SymbolTable<ELFT>::conflictMsg(SymbolBody *Old, SymbolBody *New) {
ELFFileBase<ELFT> *OldFile = findFile(Old);
@@ -198,8 +200,8 @@ template <class ELFT> void SymbolTable<E
Sym->Body = New;
}
+// Find an existing symbol or create and insert a new one.
template <class ELFT> Symbol *SymbolTable<ELFT>::insert(SymbolBody *New) {
- // Find an existing Symbol or create and insert a new one.
StringRef Name = New->getName();
Symbol *&Sym = Symtab[Name];
if (!Sym)
More information about the llvm-commits
mailing list