[lld] r289289 - COFF: Fix test failure on Windows.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 15:34:50 PST 2016


Author: pcc
Date: Fri Dec  9 17:34:49 2016
New Revision: 289289

URL: http://llvm.org/viewvc/llvm-project?rev=289289&view=rev
Log:
COFF: Fix test failure on Windows.

Modified:
    lld/trunk/COFF/DriverUtils.cpp

Modified: lld/trunk/COFF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Fri Dec  9 17:34:49 2016
@@ -513,10 +513,12 @@ void fixupExports() {
     SymbolBody *Sym = E.Sym;
     if (!E.ForwardTo.empty()) {
       E.SymbolName = E.Name;
-    } else if (auto *U = dyn_cast<Undefined>(Sym))
-      if (U->WeakAlias)
-        Sym = U->WeakAlias;
-    E.SymbolName = Sym->getName();
+    } else {
+      if (auto *U = dyn_cast<Undefined>(Sym))
+        if (U->WeakAlias)
+          Sym = U->WeakAlias;
+      E.SymbolName = Sym->getName();
+    }
   }
 
   for (Export &E : Config->Exports) {




More information about the llvm-commits mailing list