aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp26
1 files changed, 1 insertions, 25 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 010a9de..732c7ef 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -1958,10 +1958,6 @@ namespace {
class HeaderFileInfoTrait {
ASTWriter &Writer;
- // Keep track of the framework names we've used during serialization.
- SmallString<128> FrameworkStringData;
- llvm::StringMap<unsigned> FrameworkNameOffset;
-
public:
HeaderFileInfoTrait(ASTWriter &Writer) : Writer(Writer) {}
@@ -2005,7 +2001,7 @@ namespace {
std::pair<unsigned, unsigned>
EmitKeyDataLength(raw_ostream& Out, key_type_ref key, data_type_ref Data) {
unsigned KeyLen = key.Filename.size() + 1 + 8 + 8;
- unsigned DataLen = 1 + sizeof(IdentifierID) + 4;
+ unsigned DataLen = 1 + sizeof(IdentifierID);
for (auto ModInfo : Data.KnownHeaders)
if (Writer.getLocalOrImportedSubmoduleID(ModInfo.getModule()))
DataLen += 4;
@@ -2045,22 +2041,6 @@ namespace {
LE.write<IdentifierID>(
Writer.getIdentifierRef(Data.HFI.LazyControllingMacro.getPtr()));
- unsigned Offset = 0;
- if (!Data.HFI.Framework.empty()) {
- // If this header refers into a framework, save the framework name.
- llvm::StringMap<unsigned>::iterator Pos
- = FrameworkNameOffset.find(Data.HFI.Framework);
- if (Pos == FrameworkNameOffset.end()) {
- Offset = FrameworkStringData.size() + 1;
- FrameworkStringData.append(Data.HFI.Framework);
- FrameworkStringData.push_back(0);
-
- FrameworkNameOffset[Data.HFI.Framework] = Offset;
- } else
- Offset = Pos->second;
- }
- LE.write<uint32_t>(Offset);
-
auto EmitModule = [&](Module *M, ModuleMap::ModuleHeaderRole Role) {
if (uint32_t ModID = Writer.getLocalOrImportedSubmoduleID(M)) {
uint32_t Value = (ModID << 3) | (unsigned)Role;
@@ -2076,9 +2056,6 @@ namespace {
assert(Out.tell() - Start == DataLen && "Wrong data length");
}
-
- const char *strings_begin() const { return FrameworkStringData.begin(); }
- const char *strings_end() const { return FrameworkStringData.end(); }
};
} // namespace
@@ -2213,7 +2190,6 @@ void ASTWriter::WriteHeaderSearch(const HeaderSearch &HS) {
// Write the header search table
RecordData::value_type Record[] = {HEADER_SEARCH_TABLE, BucketOffset,
NumHeaderSearchEntries, TableData.size()};
- TableData.append(GeneratorTrait.strings_begin(),GeneratorTrait.strings_end());
Stream.EmitRecordWithBlob(TableAbbrev, Record, TableData);
// Free all of the strings we had to duplicate.