diff options
-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 | ||||
-rw-r--r-- | lib/AST/ASTContext.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/CGStmt.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 2 | ||||
-rw-r--r-- | lib/CodeGen/CodeGenTypes.h | 4 | ||||
-rw-r--r-- | lib/Lex/PPExpressions.cpp | 2 | ||||
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 2 | ||||
-rw-r--r-- | tools/clang-cc/clang-cc.cpp | 2 |
10 files changed, 15 insertions, 14 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; } diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 0add7e65cc..7aa3418b16 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -35,7 +35,7 @@ enum FloatingRank { }; ASTContext::ASTContext(const LangOptions& LOpts, SourceManager &SM, - TargetInfo &t, + const TargetInfo &t, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins, bool FreeMem, unsigned size_reserve) : diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index b47930e313..b6d7b39904 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -737,7 +737,7 @@ void CodeGenFunction::EmitSwitchStmt(const SwitchStmt &S) { } static std::string -SimplifyConstraint(const char *Constraint, TargetInfo &Target, +SimplifyConstraint(const char *Constraint, const TargetInfo &Target, llvm::SmallVectorImpl<TargetInfo::ConstraintInfo> *OutCons=0) { std::string Result; diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 1b1f03424d..c69dcb505a 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -74,7 +74,7 @@ class CodeGenFunction : public BlockFunction { void operator=(const CodeGenFunction&); // DO NOT IMPLEMENT public: CodeGenModule &CGM; // Per-module state. - TargetInfo &Target; + const TargetInfo &Target; typedef std::pair<llvm::Value *, llvm::Value *> ComplexPairTy; CGBuilderTy Builder; diff --git a/lib/CodeGen/CodeGenTypes.h b/lib/CodeGen/CodeGenTypes.h index a92a019b98..f447549f66 100644 --- a/lib/CodeGen/CodeGenTypes.h +++ b/lib/CodeGen/CodeGenTypes.h @@ -91,7 +91,7 @@ namespace CodeGen { /// while lowering AST types to LLVM types. class CodeGenTypes { ASTContext &Context; - TargetInfo &Target; + const TargetInfo &Target; llvm::Module& TheModule; const llvm::TargetData& TheTargetData; mutable const ABIInfo* TheABIInfo; @@ -153,7 +153,7 @@ public: ~CodeGenTypes(); const llvm::TargetData &getTargetData() const { return TheTargetData; } - TargetInfo &getTarget() const { return Target; } + const TargetInfo &getTarget() const { return Target; } ASTContext &getContext() const { return Context; } const ABIInfo &getABIInfo() const; llvm::LLVMContext &getLLVMContext() { return TheModule.getContext(); } diff --git a/lib/Lex/PPExpressions.cpp b/lib/Lex/PPExpressions.cpp index a74396c314..b54dfe093b 100644 --- a/lib/Lex/PPExpressions.cpp +++ b/lib/Lex/PPExpressions.cpp @@ -228,7 +228,7 @@ static bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, return true; // A diagnostic was already emitted. // Character literals are always int or wchar_t, expand to intmax_t. - TargetInfo &TI = PP.getTargetInfo(); + const TargetInfo &TI = PP.getTargetInfo(); unsigned NumBits; if (Literal.isMultiChar()) NumBits = TI.getIntWidth(); diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 0110e6b9a4..96c6682ad7 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -44,7 +44,7 @@ using namespace clang; //===----------------------------------------------------------------------===// Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts, - TargetInfo &target, SourceManager &SM, + const TargetInfo &target, SourceManager &SM, HeaderSearch &Headers, IdentifierInfoLookup* IILookup, bool OwnsHeaders) diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp index 6c8d78ebc1..565277ed46 100644 --- a/tools/clang-cc/clang-cc.cpp +++ b/tools/clang-cc/clang-cc.cpp @@ -224,7 +224,7 @@ CreatePreprocessor(Diagnostic &Diags, const LangOptions &LangInfo, const PreprocessorOptions &PPOpts, const HeaderSearchOptions &HSOpts, const DependencyOutputOptions &DepOpts, - TargetInfo &Target, SourceManager &SourceMgr, + const TargetInfo &Target, SourceManager &SourceMgr, FileManager &FileMgr) { // Create a PTH manager if we are using some form of a token cache. PTHManager *PTHMgr = 0; |