[lld] r256380 - Add comments.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 24 02:37:43 PST 2015
Author: ruiu
Date: Thu Dec 24 04:37:32 2015
New Revision: 256380
URL: http://llvm.org/viewvc/llvm-project?rev=256380&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=256380&r1=256379&r2=256380&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Thu Dec 24 04:37:32 2015
@@ -78,6 +78,7 @@ void SymbolTable<ELFT>::addFile(std::uni
resolve(B);
}
+// Add an undefined symbol.
template <class ELFT>
SymbolBody *SymbolTable<ELFT>::addUndefined(StringRef Name) {
auto *Sym = new (Alloc) Undefined(Name, false, STV_DEFAULT, false);
@@ -85,6 +86,8 @@ SymbolBody *SymbolTable<ELFT>::addUndefi
return Sym;
}
+// Add an undefined symbol. Unlike addUndefined, that symbol
+// doesn't have to be resolved, thus "opt" (optional).
template <class ELFT>
SymbolBody *SymbolTable<ELFT>::addUndefinedOpt(StringRef Name) {
auto *Sym = new (Alloc) Undefined(Name, false, STV_HIDDEN, true);
More information about the llvm-commits
mailing list