summaryrefslogtreecommitdiffstats
path: root/include/clang/Edit
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Edit')
-rw-r--r--include/clang/Edit/Commit.h8
-rw-r--r--include/clang/Edit/EditedSource.h12
-rw-r--r--include/clang/Edit/Rewriters.h4
3 files changed, 14 insertions, 10 deletions
diff --git a/include/clang/Edit/Commit.h b/include/clang/Edit/Commit.h
index aaf6b18..48e3d59 100644
--- a/include/clang/Edit/Commit.h
+++ b/include/clang/Edit/Commit.h
@@ -11,12 +11,12 @@
#define LLVM_CLANG_EDIT_COMMIT_H
#include "clang/Edit/FileOffset.h"
-#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringRef.h"
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 c685753..733ad40 100644
--- a/include/clang/Edit/EditedSource.h
+++ b/include/clang/Edit/EditedSource.h
@@ -11,14 +11,14 @@
#define LLVM_CLANG_EDIT_EDITEDSOURCE_H
#include "clang/Edit/FileOffset.h"
-#include "llvm/Support/Allocator.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Allocator.h"
#include <map>
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);
diff --git a/include/clang/Edit/Rewriters.h b/include/clang/Edit/Rewriters.h
index aa7a5b2..292878e 100644
--- a/include/clang/Edit/Rewriters.h
+++ b/include/clang/Edit/Rewriters.h
@@ -13,6 +13,7 @@
namespace clang {
class ObjCMessageExpr;
class NSAPI;
+ class ParentMap;
namespace edit {
class Commit;
@@ -21,7 +22,8 @@ bool rewriteObjCRedundantCallWithLiteral(const ObjCMessageExpr *Msg,
const NSAPI &NS, Commit &commit);
bool rewriteToObjCLiteralSyntax(const ObjCMessageExpr *Msg,
- const NSAPI &NS, Commit &commit);
+ const NSAPI &NS, Commit &commit,
+ const ParentMap *PMap);
bool rewriteToObjCSubscriptSyntax(const ObjCMessageExpr *Msg,
const NSAPI &NS, Commit &commit);
OpenPOWER on IntegriCloud