[libcxx] r249738 - Split <ctype.h> out of <cctype>.

Adrian Prantl via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 16 17:17:43 PDT 2015


> On Oct 16, 2015, at 5:13 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> 
> On Fri, Oct 16, 2015 at 4:48 PM, Adrian Prantl via cfe-commits <cfe-commits at lists.llvm.org <mailto:cfe-commits at lists.llvm.org>> wrote:
>> On Oct 16, 2015, at 3:27 PM, Richard Smith <richard at metafoo.co.uk <mailto:richard at metafoo.co.uk>> wrote:
>> 
>> On Thu, Oct 15, 2015 at 11:14 AM, Adrian Prantl <aprantl at apple.com <mailto:aprantl at apple.com>> wrote:
>> 
>>> On Oct 14, 2015, at 5:07 PM, Richard Smith <richard at metafoo.co.uk <mailto:richard at metafoo.co.uk>> wrote:
>>> 
>>> Ack, there are non-modular headers in the Darwin module. =( I seem to recall that they're not version-locked to your compiler, so we've got to support them as-is?
>>> 
>>> If we can't turn on local submodule visibility, then we need a module map for libc++ that covers all of its headers. I'll look into pruning the include path when building a module from an implicitly-loaded module map.
>> 
>> The attached patch implements this in the most hacky way; with it I can successfully compile the first few hundred files of LLVM.
>> 
>> Slightly less hacky approach attached, does this also unstick you? 
>> <no-undeclared-includes.diff>
> 
> Unfortunately, no. After looking at it in the debugger, I believe the problem is that HeaderSearch looks at RequestingModule->NoUndeclaredIncludes, but the RequestingModule is a nullptr (while looking for cdefs.h included via assert.h, for example).
> 
> I see; can you try changing the call to getModuleForLocation at the start of Preprocessor::LookupFile to call getModuleContainingLocation instead? (That change will break decl/use checking, but that's not hard to fix.)

This seems to break other things, but I do get a different result:

In file included from <module-includes>:71:
/Volumes/Data/llvm/_build.ninja.release/bin/../lib/clang/3.8.0/include/stddef.h:118:10: fatal error: 
      '__stddef_max_align_t.h' file not found
#include "__stddef_max_align_t.h"
         ^
In file included from test.cpp:2:
In file included from /Volumes/Data/llvm/_build.ninja.release/bin/../include/c++/v1/cassert:21:
/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/assert.h:42:10: fatal error: 
      could not build module 'Darwin'
#include <sys/cdefs.h>
 ~~~~~~~~^
2 errors generated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151016/22acb080/attachment.html>


More information about the cfe-commits mailing list