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

Francis Ricci via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 15:09:03 PDT 2017


That code should be cleaned up/removed here: https://reviews.llvm.org/D38686

On Mon, Oct 9, 2017 at 5:59 PM, David Blaikie <dblaikie at gmail.com> wrote:
> 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


More information about the llvm-commits mailing list