summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReader.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-06-21 20:32:36 +0000
committerJustin Bogner <mail@justinbogner.com>2015-06-21 20:32:36 +0000
commitca9c0ccbc03716701ea4b87f1e509e1c87ab17d4 (patch)
tree5c7270ee2fcede1c557f4f85301861308c661066 /clang/lib/Serialization/ASTReader.cpp
parent3f31bd6dc0871cc7ece80e9621f607faeb92544e (diff)
downloadbcm5719-llvm-ca9c0ccbc03716701ea4b87f1e509e1c87ab17d4.tar.gz
bcm5719-llvm-ca9c0ccbc03716701ea4b87f1e509e1c87ab17d4.zip
Revert "ASTReader: Copy input file offset data to avoid unaligned accesses"
We can do this better by changing the type to unaligned_uint64_t and paying the cost on use instead of up front. This reverts r240228 llvm-svn: 240246
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index af6f92a5115..d75b5eb73d5 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -2304,21 +2304,13 @@ ASTReader::ReadControlBlock(ModuleFile &F,
return Result;
break;
- case INPUT_FILE_OFFSETS: {
+ case INPUT_FILE_OFFSETS:
NumInputs = Record[0];
NumUserInputs = Record[1];
- F.InputFileOffsets.clear();
- F.InputFileOffsets.reserve(NumInputs);
- using namespace llvm::support;
- const char *Buf = Blob.data();
- for (unsigned int I = 0; I < NumInputs; ++I)
- F.InputFileOffsets.push_back(
- endian::readNext<uint64_t, native, unaligned>(Buf));
-
+ F.InputFileOffsets = (const uint64_t *)Blob.data();
F.InputFilesLoaded.resize(NumInputs);
break;
}
- }
}
}
OpenPOWER on IntegriCloud