[cfe-commits] r139638 - in /cfe/trunk: include/clang/Basic/LangOptions.def include/clang/Basic/LangOptions.h include/clang/Frontend/PreprocessorOptions.h lib/Basic/LangOptions.cpp lib/Frontend/CompilerInstance.cpp test/Modules/Inputs/Module.framework/Headers/Module.h test/Modules/on-demand-build.m

Douglas Gregor dgregor at apple.com
Thu Sep 15 07:58:16 PDT 2011


On Sep 15, 2011, at 2:12 AM, Sebastian Redl wrote:

> On 13.09.2011 22:44, Douglas Gregor wrote:
>> Author: dgregor
>> Date: Tue Sep 13 15:44:41 2011
>> New Revision: 139638
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=139638&view=rev
>> Log:
>> When building a module on-demand, clear out the "non-modular" language
>> and preprocessor options (such as macro definitions) first.
>> 
>> Modified:
>>     cfe/trunk/include/clang/Basic/LangOptions.def
>>     cfe/trunk/include/clang/Basic/LangOptions.h
>>     cfe/trunk/include/clang/Frontend/PreprocessorOptions.h
>>     cfe/trunk/lib/Basic/LangOptions.cpp
>>     cfe/trunk/lib/Frontend/CompilerInstance.cpp
>>     cfe/trunk/test/Modules/Inputs/Module.framework/Headers/Module.h
>>     cfe/trunk/test/Modules/on-demand-build.m
>> 
>> 
>> Modified: cfe/trunk/lib/Basic/LangOptions.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/LangOptions.cpp?rev=139638&r1=139637&r2=139638&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Basic/LangOptions.cpp (original)
>> +++ cfe/trunk/lib/Basic/LangOptions.cpp Tue Sep 13 15:44:41 2011
>> @@ -19,3 +19,9 @@
>>  #define ENUM_LANGOPT(Name, Type, Bits, Default, Description) set##Name(Default);
>>  #include "clang/Basic/LangOptions.def"
>>  }
>> +
>> +void LangOptions::resetNonModularOptions() {
>> +#define LANGOPT(Name, Bits, Default, Description)
>> +#define BENIGN_LANGOPT(Name, Bits, Default, Description) Name = Default;
>> +}
>> +
>> 
> Missing the #include here.

Yikes, thanks! Fixed in r139791.

	- Doug



More information about the cfe-commits mailing list