diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-05-17 04:35:12 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-05-17 04:35:12 +0000 |
commit | d4d553403492e1032e90813879763a0129770ffe (patch) | |
tree | 5fde8e9bd947bcf32ef0cb36922157f28b75b8d8 | |
parent | 2476759673e51c897fc928e2a8af226898859509 (diff) | |
download | llvm-d4d553403492e1032e90813879763a0129770ffe.zip llvm-d4d553403492e1032e90813879763a0129770ffe.tar.gz llvm-d4d553403492e1032e90813879763a0129770ffe.tar.bz2 |
[objcmt] Don't wrap a PCH generation action with a ObjCMigrateAction one, it messes up the PCH file.
rdar://16941811
llvm-svn: 209059
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 3 | ||||
-rw-r--r-- | clang/test/ARCMT/migrate-on-pch-and-module.m | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 3d7a83d..0d3bd7e 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -144,7 +144,8 @@ static FrontendAction *CreateFrontendAction(CompilerInstance &CI) { #endif #ifdef CLANG_ENABLE_ARCMT - if (CI.getFrontendOpts().ProgramAction != frontend::MigrateSource) { + if (CI.getFrontendOpts().ProgramAction != frontend::MigrateSource && + CI.getFrontendOpts().ProgramAction != frontend::GeneratePCH) { // Potentially wrap the base FE action in an ARC Migrate Tool action. switch (FEOpts.ARCMTAction) { case FrontendOptions::ARCMT_None: diff --git a/clang/test/ARCMT/migrate-on-pch-and-module.m b/clang/test/ARCMT/migrate-on-pch-and-module.m new file mode 100644 index 0000000..59cae3c --- /dev/null +++ b/clang/test/ARCMT/migrate-on-pch-and-module.m @@ -0,0 +1,12 @@ +// RUN: rm -rf %t-mcp +// RUN: %clang_cc1 -objcmt-migrate-subscripting -emit-pch -o %t.pch %s -isysroot %S/../Modules/Inputs/System -triple x86_64-apple-darwin10 -F %S/../Modules/Inputs -fmodules -fmodules-cache-path=%t-mcp -w +// RUN: %clang_cc1 -objcmt-migrate-subscripting -include-pch %t.pch %s -migrate -o %t.remap -isysroot %S/../Modules/Inputs/System -triple x86_64-apple-darwin10 -F %S/../Modules/Inputs -fmodules -fmodules-cache-path=%t-mcp + +#ifndef HEADER +#define HEADER + +@import Module; + +#else + +#endif |