[PATCH] D10940: COFF: Numerous fixes for interaction between LTO and weak externals.
Rui Ueyama
ruiu at google.com
Fri Jul 3 20:56:54 PDT 2015
ruiu accepted this revision.
This revision is now accepted and ready to land.
LGTM
================
Comment at: COFF/SymbolTable.cpp:130-133
@@ -134,4 +129,6 @@
+ // A weak alias may have been resolved, so check for that.
+ if (Defined *D = Undef->resolveWeakAlias()) {
+ if (Resolve)
Sym->Body = D;
- goto next;
- }
+ continue;
}
----------------
Ah, this looks better than before.
================
Comment at: COFF/Symbols.cpp:239
@@ -238,1 +238,3 @@
+Defined *Undefined::resolveWeakAlias() {
+ // A weak alias may be a weak alias to another symbol, so check recursively.
----------------
I'd name getWeakAlias.
================
Comment at: COFF/Symbols.cpp:244
@@ +243,3 @@
+ return D;
+ }
+ return nullptr;
----------------
You can remove this brace.
http://reviews.llvm.org/D10940
More information about the llvm-commits
mailing list