diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-10-01 21:16:29 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-10-01 21:16:29 +0000 |
commit | 6badc76787dc9480fd7c21d3eb75aab79d2df3f5 (patch) | |
tree | 6bdcdc36c1f1bbf1f4bf125f23782411bfcaa01b /include/clang/Edit | |
parent | 31e7636a957e33fca2874a185f192cedd14c546d (diff) |
ObjectiveC migrator: When doing migration, migrator must suggest
migration of headers which have become system headers by user having put
the .system_framework in the sdk directory.
// rdar://15066802
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191796 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Edit')
-rw-r--r-- | include/clang/Edit/Commit.h | 5 | ||||
-rw-r--r-- | include/clang/Edit/EditedSource.h | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/include/clang/Edit/Commit.h b/include/clang/Edit/Commit.h index 0ff7034ba0..626b1dd630 100644 --- a/include/clang/Edit/Commit.h +++ b/include/clang/Edit/Commit.h @@ -49,7 +49,8 @@ private: const LangOptions &LangOpts; const PPConditionalDirectiveRecord *PPRec; EditedSource *Editor; - + + const bool ForceCommitInSystemHeader; bool IsCommitable; SmallVector<Edit, 8> CachedEdits; @@ -60,7 +61,7 @@ public: Commit(const SourceManager &SM, const LangOptions &LangOpts, const PPConditionalDirectiveRecord *PPRec = 0) : SourceMgr(SM), LangOpts(LangOpts), PPRec(PPRec), Editor(0), - IsCommitable(true) { } + ForceCommitInSystemHeader(true), IsCommitable(true) { } bool isCommitable() const { return IsCommitable; } diff --git a/include/clang/Edit/EditedSource.h b/include/clang/Edit/EditedSource.h index 733ad400c9..3ad5a6be14 100644 --- a/include/clang/Edit/EditedSource.h +++ b/include/clang/Edit/EditedSource.h @@ -28,6 +28,7 @@ class EditedSource { const SourceManager &SourceMgr; const LangOptions &LangOpts; const PPConditionalDirectiveRecord *PPRec; + const bool ForceCommitInSystemHeader; struct FileEdit { StringRef Text; @@ -45,8 +46,10 @@ class EditedSource { public: EditedSource(const SourceManager &SM, const LangOptions &LangOpts, - const PPConditionalDirectiveRecord *PPRec = 0) + const PPConditionalDirectiveRecord *PPRec = 0, + const bool FCommitInSystemHeader = true) : SourceMgr(SM), LangOpts(LangOpts), PPRec(PPRec), + ForceCommitInSystemHeader(FCommitInSystemHeader), StrAlloc(/*size=*/512) { } const SourceManager &getSourceManager() const { return SourceMgr; } @@ -54,6 +57,10 @@ public: const PPConditionalDirectiveRecord *getPPCondDirectiveRecord() const { return PPRec; } + + bool getForceCommitInSystemHeader() const { + return ForceCommitInSystemHeader; + } bool canInsertInOffset(SourceLocation OrigLoc, FileOffset Offs); |