[llvm] r334580 - Fix "Optional" is ambiguous error on some bots

Pavel Labath via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 18 12:18:06 PDT 2018


It was llvm::cl::Optional, and llvm-dwarfdump.cpp has "using namespace
cl". I had considered removing the using directive, but it's usage did
seem somewhat reasonable.
On Mon, 18 Jun 2018 at 19:49, David Blaikie <dblaikie at gmail.com> wrote:
>
> What's this ambiguous with? (I know unique_ptr shows up as ambiguous between llvm:: and std:: on MSVC because MSVC provides std::make_unique unconditionally even in older language modes, etc - but not sure what would be providing something named 'Optional')
>
> On Wed, Jun 13, 2018 at 1:33 AM Pavel Labath via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>> Author: labath
>> Date: Wed Jun 13 01:29:19 2018
>> New Revision: 334580
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=334580&view=rev
>> Log:
>> Fix "Optional" is ambiguous error on some bots
>>
>> Modified:
>>     llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
>>
>> Modified: llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp?rev=334580&r1=334579&r2=334580&view=diff
>> ==============================================================================
>> --- llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp (original)
>> +++ llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp Wed Jun 13 01:29:19 2018
>> @@ -330,7 +330,7 @@ static DWARFDie toDie(const DWARFDebugNa
>>    if (!CU)
>>      return DWARFDie();
>>
>> -  if (Optional<uint64_t> DWOId = CU->getDWOId()) {
>> +  if (llvm::Optional<uint64_t> DWOId = CU->getDWOId()) {
>>      // This is a skeleton unit. Look up the DIE in the DWO unit.
>>      CU = DICtx.getDWOCompileUnitForHash(*DWOId);
>>      if (!CU)
>>
>>
>> _______________________________________________
>> 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