<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div></div><br><blockquote type="cite"><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br><blockquote type="cite"><br><br>+++ b/test/Modules/dependency-gen.m<br>@@ -0,0 +1,20 @@<br>+// RUN: rm -rf %t-mcp<br>+// RUN: mkdir -p %t-mcp<br>+<br>+// RUN: %clang_cc1 -x objective-c -dependency-file %t.d.1 -MT %s.o -I %S/Inputs -fsyntax-only -fmodules -fmodules-cache-path=%t-mcp %s<br>+// RUN: FileCheck %s < %t.d.1<br>+// CHECK: dependency-gen.m<br>+// CHECK: Inputs/diamond_top.h<br>+// CHECK: Inputs/module.map<br>+// CHECK-NOT: string.h<br>+<br>+<br>+// RUN: %clang_cc1 -x objective-c -dependency-file %t.d.2 -MT %s.o -I %S/Inputs -sys-header-deps -fsyntax-only -fmodules -fmodules-cache-path=%t-mcp %s<br>+// RUN: FileCheck %s -check-prefix=CHECK-SYS < %t.d.2<br>+// CHECK-SYS: dependency-gen.m<br>+// CHECK-SYS: Inputs/diamond_top.h<br>+// CHECK-SYS: Inputs/module.map<br>+// CHECK-SYS: string.h<br>+<br>+#import "diamond_top.h"<br>+#import "string.h"<br><br>Is this importing 'string.h' from the system ?<br></blockquote><br>Ha, yes.  Luckily there was another test that already had a sysroot with a module.map.<br><br>The updated patch is attached.  Let me know if you’d like me to send a patch with whitespace changes omitted, since there are a lot of indentation changes.<br><br>Ben<br><br><span><print-module-deps.patch></span><br><br><blockquote type="cite"><br><br>On Mar 4, 2014, at 9:37 PM, Ben Langmuir <<a href="mailto:blangmuir@apple.com">blangmuir@apple.com</a>> wrote:<br><br><blockquote type="cite">Annnnnd I finally got around to updating this patch!<br><br>The new patch is simplified to rely on the ASTWriter’s concept of what a ‘system’ dependency is.  To that end, I’ve changed module.map files to no longer be unconditionally ‘user’ files.  Previously we forced module.map to be ‘user’ input files as a cheap way to detect system header changes without ‘stat’ing all the headers.  With Dmitri’s work on a timestamp-file-based approach, we shouldn’t need that trick anymore.<br><br>Ben<br><br><print-module-deps.patch><br>On Jan 22, 2014, at 4:40 PM, Ben Langmuir <<a href="mailto:blangmuir@apple.com">blangmuir@apple.com</a>> wrote:<br><br><blockquote type="cite">This patch adds module dependencies to the dependency files created by -MD/-MMD/etc.  It does so by attaching an ASTReaderListener that will call into the dependency file generator when a module input file is seen in the serialized AST.  In order to add/not add system headers appropriately, the IsSystem flag from the clang::Module is passed through the ASTReader and ModuleFile. There was also an addition to allow chaining ASTReaderListeners (let me know if you’d prefer that to be a separate patch).<br><br>Ben<br><br><module-deps.patch>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a></blockquote></blockquote></blockquote></div></blockquote></blockquote></div><br></body></html>