summaryrefslogtreecommitdiffstats
path: root/include/clang/Edit
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-12-04 07:27:05 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-12-04 07:27:05 +0000
commit37ed12720a35b7bfa1c4de73ad6f1c6c1c88ee17 (patch)
treebba1cb7716cd13f295e22172dd4ca239d62fae54 /include/clang/Edit
parentdf1059cac42d613547d86b4e44c5e364bfc03073 (diff)
Refactor recording the preprocessor conditional directive regions out of
PreprocessingRecord and into its own class, PPConditionalDirectiveRecord. Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord without needing a PreprocessingRecord. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169229 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Edit')
-rw-r--r--include/clang/Edit/Commit.h6
-rw-r--r--include/clang/Edit/EditedSource.h10
2 files changed, 9 insertions, 7 deletions
diff --git a/include/clang/Edit/Commit.h b/include/clang/Edit/Commit.h
index aaf6b18384..610112a716 100644
--- a/include/clang/Edit/Commit.h
+++ b/include/clang/Edit/Commit.h
@@ -16,7 +16,7 @@
namespace clang {
class LangOptions;
- class PreprocessingRecord;
+ class PPConditionalDirectiveRecord;
namespace edit {
class EditedSource;
@@ -46,7 +46,7 @@ public:
private:
const SourceManager &SourceMgr;
const LangOptions &LangOpts;
- const PreprocessingRecord *PPRec;
+ const PPConditionalDirectiveRecord *PPRec;
EditedSource *Editor;
bool IsCommitable;
@@ -55,7 +55,7 @@ private:
public:
explicit Commit(EditedSource &Editor);
Commit(const SourceManager &SM, const LangOptions &LangOpts,
- const PreprocessingRecord *PPRec = 0)
+ const PPConditionalDirectiveRecord *PPRec = 0)
: SourceMgr(SM), LangOpts(LangOpts), PPRec(PPRec), Editor(0),
IsCommitable(true) { }
diff --git a/include/clang/Edit/EditedSource.h b/include/clang/Edit/EditedSource.h
index c685753e4b..aae054605e 100644
--- a/include/clang/Edit/EditedSource.h
+++ b/include/clang/Edit/EditedSource.h
@@ -18,7 +18,7 @@
namespace clang {
class LangOptions;
- class PreprocessingRecord;
+ class PPConditionalDirectiveRecord;
namespace edit {
class Commit;
@@ -27,7 +27,7 @@ namespace edit {
class EditedSource {
const SourceManager &SourceMgr;
const LangOptions &LangOpts;
- const PreprocessingRecord *PPRec;
+ const PPConditionalDirectiveRecord *PPRec;
struct FileEdit {
StringRef Text;
@@ -45,13 +45,15 @@ class EditedSource {
public:
EditedSource(const SourceManager &SM, const LangOptions &LangOpts,
- const PreprocessingRecord *PPRec = 0)
+ const PPConditionalDirectiveRecord *PPRec = 0)
: SourceMgr(SM), LangOpts(LangOpts), PPRec(PPRec),
StrAlloc(/*size=*/512) { }
const SourceManager &getSourceManager() const { return SourceMgr; }
const LangOptions &getLangOpts() const { return LangOpts; }
- const PreprocessingRecord *getPreprocessingRecord() const { return PPRec; }
+ const PPConditionalDirectiveRecord *getPPCondDirectiveRecord() const {
+ return PPRec;
+ }
bool canInsertInOffset(SourceLocation OrigLoc, FileOffset Offs);