[llvm] r267068 - Fix -Wreturn-type warning with HAVE_DIA_SDK is false.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 15:26:39 PDT 2016


bizarre, I've never used tabs in any editor ever, but somehow it is indeed
a tab.  It magically turned itself on.

On Thu, Apr 21, 2016 at 3:23 PM David Blaikie <dblaikie at gmail.com> wrote:

> On Thu, Apr 21, 2016 at 3:16 PM, Zachary Turner via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: zturner
>> Date: Thu Apr 21 17:16:19 2016
>> New Revision: 267068
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=267068&view=rev
>> Log:
>> Fix -Wreturn-type warning with HAVE_DIA_SDK is false.
>>
>> Modified:
>>     llvm/trunk/lib/DebugInfo/PDB/PDB.cpp
>>
>> Modified: llvm/trunk/lib/DebugInfo/PDB/PDB.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDB.cpp?rev=267068&r1=267067&r2=267068&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/DebugInfo/PDB/PDB.cpp (original)
>> +++ llvm/trunk/lib/DebugInfo/PDB/PDB.cpp Thu Apr 21 17:16:19 2016
>> @@ -30,6 +30,7 @@ PDB_ErrorCode llvm::loadDataForPDB(PDB_R
>>  #if HAVE_DIA_SDK
>>    return DIASession::createFromPdb(Path, Session);
>>  #endif
>> +       return PDB_ErrorCode::NoDiaSupport;
>>
>
> Formatting? (looks like too many spaces - maybe that's a tab?)
>
> Also, it might be best to use #else so that the second return isn't dead
> code (could produce a warning on a better compiler, maybe).
> Could even:
>
>   return
> #if HAVE_DIA_SDK
>     DIASession::createFromPdb(...);
> #else
>     PDB_ErrorCode::NoDiaSupport;
> #endif
>
> if that seems better... dunno.
>
>
>>  }
>>
>>  PDB_ErrorCode llvm::loadDataForEXE(PDB_ReaderType Type, StringRef Path,
>> @@ -41,4 +42,5 @@ PDB_ErrorCode llvm::loadDataForEXE(PDB_R
>>  #if HAVE_DIA_SDK
>>    return DIASession::createFromExe(Path, Session);
>>  #endif
>> +       return PDB_ErrorCode::NoDiaSupport;
>>  }
>>
>>
>> _______________________________________________
>> 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/20160421/676eccc2/attachment.html>


More information about the llvm-commits mailing list