summaryrefslogtreecommitdiffstats
path: root/lib/ARCMigrate
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-11-18 04:32:13 +0000
committerTed Kremenek <kremenek@apple.com>2011-11-18 04:32:13 +0000
commit8a0c5c2ec5c5496cfb01d2c86bd50991866a7356 (patch)
tree74922c6dc1fe51083207be0ef3884f31f7c3ea7b /lib/ARCMigrate
parent5a1ac89b244940a0337ea7ae7dc371e2a9bf7c50 (diff)
Refine placement of LangOptions object in CompilerInvocation by adding a new baseclass CompilerInvocationBase with a custom copy constructor. This ensures that whenever the CompilerInvocation object's copy constructor is used we always clone the LangOptions object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ARCMigrate')
-rw-r--r--lib/ARCMigrate/ARCMT.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/ARCMigrate/ARCMT.cpp b/lib/ARCMigrate/ARCMT.cpp
index 06bc6b8c04..9985160468 100644
--- a/lib/ARCMigrate/ARCMT.cpp
+++ b/lib/ARCMigrate/ARCMT.cpp
@@ -190,7 +190,6 @@ createInvocationForMigration(CompilerInvocation &origCI) {
CInvok->getPreprocessorOpts().ImplicitPTHInclude = std::string();
std::string define = getARCMTMacroName();
define += '=';
- CInvok->setLangOpts(new LangOptions(*CInvok->getLangOpts()));
CInvok->getPreprocessorOpts().addMacroDef(define);
CInvok->getLangOpts()->ObjCAutoRefCount = true;
CInvok->getLangOpts()->setGC(LangOptions::NonGC);