[lld] r205637 - Revert "temporary commit."

Rui Ueyama ruiu at google.com
Fri Apr 4 11:06:56 PDT 2014


Author: ruiu
Date: Fri Apr  4 13:06:56 2014
New Revision: 205637

URL: http://llvm.org/viewvc/llvm-project?rev=205637&view=rev
Log:
Revert "temporary commit."

This reverts commit r205635 that was submitted by mistake.

Modified:
    lld/trunk/lib/Core/SymbolTable.cpp

Modified: lld/trunk/lib/Core/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/SymbolTable.cpp?rev=205637&r1=205636&r2=205637&view=diff
==============================================================================
--- lld/trunk/lib/Core/SymbolTable.cpp (original)
+++ lld/trunk/lib/Core/SymbolTable.cpp Fri Apr  4 13:06:56 2014
@@ -262,37 +262,43 @@ void SymbolTable::addByName(const Atom &
     break;
   }
   case NCR_DupShLib: {
-    const SharedLibraryAtom *curShLib = dyn_cast<SharedLibraryAtom>(existing);
-    const SharedLibraryAtom *newShLib = dyn_cast<SharedLibraryAtom>(&newAtom);
-    assert(curShLib != nullptr);
-    assert(newShLib != nullptr);
-    bool sameNullness =
-        (curShLib->canBeNullAtRuntime() == newShLib->canBeNullAtRuntime());
-    bool sameName = curShLib->loadName().equals(newShLib->loadName());
-    if (!sameName) {
-      useNew = false;
-      if (_context.warnIfCoalesableAtomsHaveDifferentLoadName()) {
-        // FIXME: need diagonstics interface for writing warning messages
-        llvm::errs() << "lld warning: shared library symbol "
-                     << curShLib->name() << " has different load path in "
-                     << curShLib->file().path() << " and in "
-                     << newShLib->file().path();
+      const SharedLibraryAtom* curShLib =
+        dyn_cast<SharedLibraryAtom>(existing);
+      const SharedLibraryAtom* newShLib =
+        dyn_cast<SharedLibraryAtom>(&newAtom);
+      assert(curShLib != nullptr);
+      assert(newShLib != nullptr);
+      bool sameNullness = (curShLib->canBeNullAtRuntime()
+                                      == newShLib->canBeNullAtRuntime());
+      bool sameName = curShLib->loadName().equals(newShLib->loadName());
+      if (!sameName) {
+        useNew = false;
+        if (_context.warnIfCoalesableAtomsHaveDifferentLoadName()) {
+          // FIXME: need diagonstics interface for writing warning messages
+          llvm::errs() << "lld warning: shared library symbol "
+                       << curShLib->name()
+                       << " has different load path in "
+                       << curShLib->file().path()
+                       << " and in "
+                       << newShLib->file().path();
+        }
+      } else if (!sameNullness) {
+        useNew = false;
+        if (_context.warnIfCoalesableAtomsHaveDifferentCanBeNull()) {
+          // FIXME: need diagonstics interface for writing warning messages
+          llvm::errs() << "lld warning: shared library symbol "
+                       << curShLib->name()
+                       << " has different weakness in "
+                       << curShLib->file().path()
+                       << " and in "
+                       << newShLib->file().path();
+        }
+      } else {
+        // Both shlib atoms are identical and can be coalesced.
+        useNew = false;
       }
-    } else if (!sameNullness) {
-      useNew = false;
-      if (_context.warnIfCoalesableAtomsHaveDifferentCanBeNull()) {
-        // FIXME: need diagonstics interface for writing warning messages
-        llvm::errs() << "lld warning: shared library symbol "
-                     << curShLib->name() << " has different weakness in "
-                     << curShLib->file().path() << " and in "
-                     << newShLib->file().path();
-      }
-    } else {
-      // Both shlib atoms are identical and can be coalesced.
-      useNew = false;
     }
     break;
-  }
   case NCR_Error:
     llvm::errs() << "SymbolTable: error while merging " << name << "\n";
     llvm::report_fatal_error("duplicate symbol error");





More information about the llvm-commits mailing list