[lld] r205635 - temporary commit.

Rui Ueyama ruiu at google.com
Fri Apr 4 11:12:14 PDT 2014


My apologies. I made a mistake when updating the commit message of this
just before submitting. I'll roll it back and re-submit with the correct
commit message. Embarrassed. :(

 On Fri, Apr 4, 2014 at 11:01 AM, Rui Ueyama <ruiu at google.com> wrote:

> Author: ruiu
> Date: Fri Apr  4 13:01:52 2014
> New Revision: 205635
>
> URL: http://llvm.org/viewvc/llvm-project?rev=205635&view=rev
> Log:
> temporary commit.
>
> 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=205635&r1=205634&r2=205635&view=diff
>
> ==============================================================================
> --- lld/trunk/lib/Core/SymbolTable.cpp (original)
> +++ lld/trunk/lib/Core/SymbolTable.cpp Fri Apr  4 13:01:52 2014
> @@ -262,43 +262,37 @@ 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();
> -        }
> -      } 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;
> +    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;
>      }
>      break;
> +  }
>    case NCR_Error:
>      llvm::errs() << "SymbolTable: error while merging " << name << "\n";
>      llvm::report_fatal_error("duplicate symbol error");
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140404/f11b4539/attachment.html>


More information about the llvm-commits mailing list