diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-12-05 14:52:04 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-12-05 14:52:04 +0000 |
commit | aa8362e18eab808b975eddc5489e1e2e311dce85 (patch) | |
tree | 2ed4902424669813cc00cb5098fd04a49ae4690e /include/clang/Serialization | |
parent | 4af108f4414e16b61fb314e2fcf3ed24ffc5f1af (diff) |
Temporarily reverting r223443 due to bot breakage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223465 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r-- | include/clang/Serialization/ASTBitCodes.h | 5 | ||||
-rw-r--r-- | include/clang/Serialization/ASTReader.h | 14 | ||||
-rw-r--r-- | include/clang/Serialization/ASTWriter.h | 25 | ||||
-rw-r--r-- | include/clang/Serialization/Module.h | 3 |
4 files changed, 13 insertions, 34 deletions
diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h index d8629c2dde..85495839d3 100644 --- a/include/clang/Serialization/ASTBitCodes.h +++ b/include/clang/Serialization/ASTBitCodes.h @@ -291,10 +291,7 @@ namespace clang { MODULE_MAP_FILE = 14, /// \brief Record code for the signature that identifiers this AST file. - SIGNATURE = 15, - - /// \brief Record code for the module build directory. - MODULE_DIRECTORY = 16, + SIGNATURE = 15 }; /// \brief Record types that occur within the input-files block diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 91ad34bd1c..1b0347e91f 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -1113,11 +1113,12 @@ private: serialization::InputFile getInputFile(ModuleFile &F, unsigned ID, bool Complain = true); -public: - void ResolveImportedPath(ModuleFile &M, std::string &Filename); - static void ResolveImportedPath(std::string &Filename, StringRef Prefix); + /// \brief Get a FileEntry out of stored-in-PCH filename, making sure we take + /// into account all the necessary relocations. + const FileEntry *getFileEntry(StringRef filename); + + void MaybeAddSystemRootToFilename(ModuleFile &M, std::string &Filename); -private: struct ImportedModule { ModuleFile *Mod; ModuleFile *ImportedBy; @@ -1140,7 +1141,7 @@ private: const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities); ASTReadResult ReadASTBlock(ModuleFile &F, unsigned ClientLoadCapabilities); - bool ParseLineTable(ModuleFile &F, const RecordData &Record); + bool ParseLineTable(ModuleFile &F, SmallVectorImpl<uint64_t> &Record); bool ReadSourceManagerBlock(ModuleFile &F); llvm::BitstreamCursor &SLocCursorForID(int ID); SourceLocation getImportLocation(ModuleFile *F); @@ -2044,9 +2045,6 @@ public: // \brief Read a string static std::string ReadString(const RecordData &Record, unsigned &Idx); - // \brief Read a path - std::string ReadPath(ModuleFile &F, const RecordData &Record, unsigned &Idx); - /// \brief Read a version tuple. static VersionTuple ReadVersionTuple(const RecordData &Record, unsigned &Idx); diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h index 9907fae676..20e9935c0c 100644 --- a/include/clang/Serialization/ASTWriter.h +++ b/include/clang/Serialization/ASTWriter.h @@ -111,10 +111,7 @@ private: /// \brief The module we're currently writing, if any. Module *WritingModule; - - /// \brief The base directory for any relative paths we emit. - std::string BaseDirectory; - + /// \brief Indicates when the AST writing is actively performing /// serialization, rather than just queueing updates. bool WritingAST; @@ -460,11 +457,13 @@ private: StringRef isysroot, const std::string &OutputFile); void WriteInputFiles(SourceManager &SourceMgr, HeaderSearchOptions &HSOpts, + StringRef isysroot, bool Modules); void WriteSourceManagerBlock(SourceManager &SourceMgr, - const Preprocessor &PP); + const Preprocessor &PP, + StringRef isysroot); void WritePreprocessor(const Preprocessor &PP, bool IsModule); - void WriteHeaderSearch(const HeaderSearch &HS); + void WriteHeaderSearch(const HeaderSearch &HS, StringRef isysroot); void WritePreprocessorDetail(PreprocessingRecord &PPRec); void WriteSubmodules(Module *WritingModule); @@ -540,8 +539,7 @@ public: /// writing a precompiled header. /// /// \param isysroot if non-empty, write a relocatable file whose headers - /// are relative to the given system root. If we're writing a module, its - /// build directory will be used in preference to this if both are available. + /// are relative to the given system root. void WriteAST(Sema &SemaRef, const std::string &OutputFile, Module *WritingModule, StringRef isysroot, @@ -688,17 +686,6 @@ public: /// \brief Add a string to the given record. void AddString(StringRef Str, RecordDataImpl &Record); - /// \brief Convert a path from this build process into one that is appropriate - /// for emission in the module file. - bool PreparePathForOutput(SmallVectorImpl<char> &Path); - - /// \brief Add a path to the given record. - void AddPath(StringRef Path, RecordDataImpl &Record); - - /// \brief Emit the current record with the given path as a blob. - void EmitRecordWithPath(unsigned Abbrev, RecordDataImpl &Record, - StringRef Path); - /// \brief Add a version tuple to the given record void AddVersionTuple(const VersionTuple &Version, RecordDataImpl &Record); diff --git a/include/clang/Serialization/Module.h b/include/clang/Serialization/Module.h index 426cec5dd7..f6889cfe8e 100644 --- a/include/clang/Serialization/Module.h +++ b/include/clang/Serialization/Module.h @@ -125,9 +125,6 @@ public: /// \brief The name of the module. std::string ModuleName; - /// \brief The base directory of the module. - std::string BaseDirectory; - std::string getTimestampFilename() const { return FileName + ".timestamp"; } |