[cfe-commits] r167539 - in /cfe/trunk: include/clang/Serialization/ModuleManager.h lib/Frontend/CompilerInstance.cpp lib/Serialization/ASTReader.cpp lib/Serialization/ModuleManager.cpp test/Modules/Inputs/Modified/ test/Modules/Inputs/Modified/A.h test/Modules/Inputs/Modified/B.h test/Modules/Inputs/Modified/module.map test/Modules/modify-module.m

Douglas Gregor dgregor at apple.com
Tue Dec 11 09:45:00 PST 2012


On Dec 11, 2012, at 5:02 AM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:

> 2012/11/8 Douglas Gregor <dgregor at apple.com>:
>> Author: dgregor
>> Date: Wed Nov  7 11:46:15 2012
>> New Revision: 167539
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=167539&view=rev
>> Log:
>> When loading a module fails because it is out of date, rebuild that
>> module in place. <rdar://problem/10138913>
> 
>> Added: cfe/trunk/test/Modules/modify-module.m
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/modify-module.m?rev=167539&view=auto
>> ==============================================================================
>> --- cfe/trunk/test/Modules/modify-module.m (added)
>> +++ cfe/trunk/test/Modules/modify-module.m Wed Nov  7 11:46:15 2012
>> @@ -0,0 +1,23 @@
>> +// Test that if we modify one of the input files used to form a
>> +// header, that module and dependent modules get rebuilt.
>> +
>> +// RUN: rm -rf %t
>> +// RUN: mkdir -p %t/include
>> +// RUN: cp %S/Inputs/Modified/A.h %t/include
>> +// RUN: cp %S/Inputs/Modified/B.h %t/include
>> +// RUN: cp %S/Inputs/Modified/module.map %t/include
>> +// RUN: %clang_cc1 -fmodule-cache-path %t/cache -fmodules -I %t/include %s -verify
>> +// expected-no-diagnostics
> 
> Doug, excuse me to comment older commit.
> 
> Should be?
> // {expected-no-diagnostics}
> 
> Or I can see below;
> 
> error: no expected directives found: consider use of 'expected-no-diagnostics'
> 1 error generated.
> 
> (But clang exits successfully regardless of braces…)

This might be weirdness with the Windows file system, which we've seen before. We could replace the 'touch' command with an rm/cp pair, so we're certain that the B.h getting included is different.

	- Doug

>> +// RUN: touch %t/include/B.h
>> +// RUN: %clang_cc1 -fmodule-cache-path %t/cache -fmodules -I %t/include %s -verify
>> +// RUN: echo 'int getA(); int getA2();' > %t/include/A.h
>> +// RUN: %clang_cc1 -fmodule-cache-path %t/cache -fmodules -I %t/include %s -verify
>> +
>> + at __experimental_modules_import B;
>> +
>> +int getValue() { return getA() + getB(); }





More information about the cfe-commits mailing list