[llvm] r315006 - [dsymutil] Fix unused variable warning

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 14:59:18 PDT 2017


Is this error path tested? I'm guessing not because I think llvm::Error
would fail on that error handling, since it doesn't actually handle the
error (doesn't print the failure or otherwise deal with it). If that's
really the intended behavior, you may need a "consumeError" call here - and
a test in either case

On Thu, Oct 5, 2017 at 12:37 PM Francis Ricci via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: fjricci
> Date: Thu Oct  5 12:35:55 2017
> New Revision: 315006
>
> URL: http://llvm.org/viewvc/llvm-project?rev=315006&view=rev
> Log:
> [dsymutil] Fix unused variable warning
>
> Modified:
>     llvm/trunk/tools/dsymutil/DwarfLinker.cpp
>
> Modified: llvm/trunk/tools/dsymutil/DwarfLinker.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DwarfLinker.cpp?rev=315006&r1=315005&r2=315006&view=diff
>
> ==============================================================================
> --- llvm/trunk/tools/dsymutil/DwarfLinker.cpp (original)
> +++ llvm/trunk/tools/dsymutil/DwarfLinker.cpp Thu Oct  5 12:35:55 2017
> @@ -3493,7 +3493,7 @@ bool DwarfLinker::link(const DebugMap &M
>      if (Obj->getType() == MachO::N_AST) {
>        auto ErrOrMemBufferRefs = BinHolder.GetMemoryBuffersForFile(
>            Obj->getObjectFilename(), Obj->getTimestamp());
> -      if (auto Err = ErrOrMemBufferRefs.getError())
> +      if (ErrOrMemBufferRefs.getError())
>          continue;
>        if (!Options.NoOutput)
>          Streamer->emitSwiftAST(ErrOrMemBufferRefs.get());
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171009/44a2d0fd/attachment.html>


More information about the llvm-commits mailing list