diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-13 05:51:54 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-13 05:51:54 +0000 |
commit | 444be7366d0a1e172c0290a1ea54c1cb16b5947c (patch) | |
tree | 49e663c746be1516db2d8d1124452019981bd82a /include | |
parent | 7fe26ac635d4ca61b3d09af619753a7df1cd80ce (diff) |
Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/ASTContext.h | 4 | ||||
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 7 | ||||
-rw-r--r-- | include/clang/Parse/Parser.h | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 20ed4ef539..260aca6c89 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -232,7 +232,7 @@ class ASTContext { llvm::DenseMap<const Decl *, std::string> DeclComments; public: - TargetInfo &Target; + const TargetInfo &Target; IdentifierTable &Idents; SelectorTable &Selectors; Builtin::Context &BuiltinInfo; @@ -319,7 +319,7 @@ public: CanQualType UndeducedAutoTy; CanQualType ObjCBuiltinIdTy, ObjCBuiltinClassTy; - ASTContext(const LangOptions& LOpts, SourceManager &SM, TargetInfo &t, + ASTContext(const LangOptions& LOpts, SourceManager &SM, const TargetInfo &t, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins, bool FreeMemory = true, unsigned size_reserve=0); diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 799efa8685..facef7b7ae 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -51,7 +51,7 @@ class DirectoryLookup; class Preprocessor { Diagnostic *Diags; LangOptions Features; - TargetInfo &Target; + const TargetInfo &Target; FileManager &FileMgr; SourceManager &SourceMgr; ScratchBuffer *ScratchBuf; @@ -210,7 +210,8 @@ private: // Cached tokens state. std::vector<CachedTokensTy::size_type> BacktrackPositions; public: - Preprocessor(Diagnostic &diags, const LangOptions &opts, TargetInfo &target, + Preprocessor(Diagnostic &diags, const LangOptions &opts, + const TargetInfo &target, SourceManager &SM, HeaderSearch &Headers, IdentifierInfoLookup *IILookup = 0, bool OwnsHeaderSearch = false); @@ -221,7 +222,7 @@ public: void setDiagnostics(Diagnostic &D) { Diags = &D; } const LangOptions &getLangOptions() const { return Features; } - TargetInfo &getTargetInfo() const { return Target; } + const TargetInfo &getTargetInfo() const { return Target; } FileManager &getFileManager() const { return FileMgr; } SourceManager &getSourceManager() const { return SourceMgr; } HeaderSearch &getHeaderSearchInfo() const { return HeaderInfo; } diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index 548d746859..3e75189aea 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -114,7 +114,7 @@ public: ~Parser(); const LangOptions &getLang() const { return PP.getLangOptions(); } - TargetInfo &getTargetInfo() const { return PP.getTargetInfo(); } + const TargetInfo &getTargetInfo() const { return PP.getTargetInfo(); } Preprocessor &getPreprocessor() const { return PP; } Action &getActions() const { return Actions; } |