aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-09-28 19:05:17 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-09-28 19:05:17 +0000
commita5ee089fffc9c98d454694f80e7b541e97ca495e (patch)
treeb9aa58344296ec68f613df0d12f3cd5fe3e17d4f /lib/Driver/Tools.cpp
parent580cd17f256259f39a382e967173f34d68e73859 (diff)
Modern objcective-C translator. When doing rewriting, Do not
use the integrated pre-processor, preprocess in objective-c++ mode. // rdar://12189793. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 12564b43f6..3d1c9f4e8c 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -2852,7 +2852,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
it = Inputs.begin(), ie = Inputs.end(); it != ie; ++it) {
const InputInfo &II = *it;
CmdArgs.push_back("-x");
- CmdArgs.push_back(types::getTypeName(II.getType()));
+ if (Args.hasArg(options::OPT_rewrite_objc))
+ CmdArgs.push_back(types::getTypeName(types::TY_PP_ObjCXX));
+ else
+ CmdArgs.push_back(types::getTypeName(II.getType()));
if (II.isFilename())
CmdArgs.push_back(II.getFilename());
else