[lld] r181752 - [lld][LayoutPass] Fix a bug that caused buildbot to fail on some platforms.

David Blaikie dblaikie at gmail.com
Mon May 13 20:08:10 PDT 2013


On Mon, May 13, 2013 at 6:51 PM, Rui Ueyama <ruiu at google.com> wrote:
> Author: ruiu
> Date: Mon May 13 20:51:56 2013
> New Revision: 181752
>
> URL: http://llvm.org/viewvc/llvm-project?rev=181752&view=rev
> Log:
> [lld][LayoutPass] Fix a bug that caused buildbot to fail on some platforms.

Would it be possible/practical to add a test case that would fail on
all platforms?

>
> Modified:
>     lld/trunk/lib/Passes/LayoutPass.cpp
>
> Modified: lld/trunk/lib/Passes/LayoutPass.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/LayoutPass.cpp?rev=181752&r1=181751&r2=181752&view=diff
> ==============================================================================
> --- lld/trunk/lib/Passes/LayoutPass.cpp (original)
> +++ lld/trunk/lib/Passes/LayoutPass.cpp Mon May 13 20:51:56 2013
> @@ -144,15 +144,16 @@ const DefinedAtom *LayoutPass::findAtomF
>  bool LayoutPass::checkAllPrevAtomsZeroSize(const DefinedAtom *targetAtom) {
>    const DefinedAtom *atom = _followOnRoots[targetAtom];
>    while (true) {
> -    AtomToAtomT::iterator targetFollowOnAtomsIter = _followOnNexts.find(atom);
> -    // The target atom must be in the chain of its root.
> -    assert(targetFollowOnAtomsIter != _followOnNexts.end());
>      if (atom == targetAtom)
>        return true;
>      if ((*atom).size() != 0)
>        // TODO: print warning that an impossible layout is being desired by the
>        // user.
>        return false;
> +    AtomToAtomT::iterator targetFollowOnAtomsIter = _followOnNexts.find(atom);
> +    // The target atom must be in the chain of its root.
> +    assert(targetFollowOnAtomsIter != _followOnNexts.end());
> +    atom = targetFollowOnAtomsIter->second;
>    }
>  }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list