[libunwind] r321440 - [libunwind] Avoid using C++ headers.

Don Hinton via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 25 11:26:46 PST 2017


On Mon, Dec 25, 2017 at 11:09 AM, whitequark <whitequark at whitequark.org>
wrote:

> On 2017-12-25 19:04, Don Hinton wrote:
>
>> Hi:
>>
>> This change breaks in a local debug build, e.g.,:
>>
>> /Users/dhinton/projects/llvm_project/libunwind/src/DwarfPars
>> er.hpp:559:28:
>> error: no member named 'numeric_limits' in namespace 'std'
>>       assert(length < std::numeric_limits<pint_t>::max() && "pointer
>> overflow");
>>                       ~~~~~^
>>
>
> Sorry, I missed this. Any idea on reformulating the assert in a way
> that does not require libcxx headers? Not having them significantly
> simplifies bare-metal builds...
>

Well, assuming pint_t is some unsigned integer type, the max can be found
like this:

  pint_t max_pint_t = ~0;

So, that could be used in a pinch.


>
>
>> thanks...
>> don
>>
>> On Mon, Dec 25, 2017 at 5:06 AM, whitequark via cfe-commits
>> <cfe-commits at lists.llvm.org> wrote:
>>
>> Author: whitequark
>>> Date: Mon Dec 25 05:06:09 2017
>>> New Revision: 321440
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=321440&view=rev [1]
>>> Log:
>>> [libunwind] Avoid using C++ headers.
>>>
>>> This is useful for building libunwind on libcxx-free systems.
>>>
>>> Modified:
>>> libunwind/trunk/src/DwarfParser.hpp
>>>
>>> Modified: libunwind/trunk/src/DwarfParser.hpp
>>> URL:
>>>
>>> http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/Dwar
>> fParser.hpp?rev=321440&r1=321439&r2=321440&view=diff
>>
>>> [2]
>>>
>>> ============================================================
>> ==================
>>
>>> --- libunwind/trunk/src/DwarfParser.hpp (original)
>>> +++ libunwind/trunk/src/DwarfParser.hpp Mon Dec 25 05:06:09 2017
>>> @@ -17,7 +17,7 @@
>>> #include <stdint.h>
>>> #include <stdio.h>
>>> #include <stdlib.h>
>>> -#include <limits>
>>> +#include <limits.h>
>>>
>>> #include "libunwind.h"
>>> #include "dwarf2.h"
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits [3]
>>>
>>
>>
>>
>> Links:
>> ------
>> [1] http://llvm.org/viewvc/llvm-project?rev=321440&view=rev
>> [2]
>> http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/Dwar
>> fParser.hpp?rev=321440&r1=321439&r2=321440&view=diff
>> [3] http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
> --
> whitequark
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171225/1cca24f1/attachment.html>


More information about the cfe-commits mailing list