[llvm] r305143 - Added llvm_unreachable as ReportError cannot be specified as noreturn.
Galina Kistanova via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 12 12:11:35 PDT 2017
Because ReportError is a lambda, and I do not think one could declare
operator() of a lambda as noreturn on any standard way within c++11.
What am I missing?
Thanks
Galina
On Mon, Jun 12, 2017 at 9:53 AM, David Blaikie <dblaikie at gmail.com> wrote:
> Why can't ReportError be noreturn?
>
> On Sat, Jun 10, 2017 at 12:50 AM Galina Kistanova via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: gkistanova
>> Date: Sat Jun 10 02:50:14 2017
>> New Revision: 305143
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=305143&view=rev
>> Log:
>> Added llvm_unreachable as ReportError cannot be specified as noreturn.
>>
>> Modified:
>> llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
>>
>> Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/
>> DWARFDebugFrame.cpp?rev=305143&r1=305142&r2=305143&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp (original)
>> +++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp Sat Jun 10
>> 02:50:14 2017
>> @@ -585,6 +585,7 @@ void DWARFDebugFrame::parse(DataExtracto
>> switch (AugmentationString[i]) {
>> default:
>> ReportError("Unknown augmentation character in entry at
>> %lx");
>> + llvm_unreachable("ReportError should not return.");
>> case 'L':
>> LSDAPointerEncoding = Data.getU8(&Offset);
>> break;
>>
>>
>> _______________________________________________
>> 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/20170612/27e3b5fa/attachment.html>
More information about the llvm-commits
mailing list