aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/LayoutOverrideSource.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-03 19:31:51 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-03 19:31:51 +0000
commit3dd5fe2006d26fca4fcd5c07d660c34f0835f510 (patch)
tree38b615aa9d4c90ed141d2b72f5abec9503ab198d /clang/lib/Frontend/LayoutOverrideSource.cpp
parent92afda06d7f9265c5ac88aff72da332279033496 (diff)
downloadllvm-3dd5fe2006d26fca4fcd5c07d660c34f0835f510.zip
llvm-3dd5fe2006d26fca4fcd5c07d660c34f0835f510.tar.gz
llvm-3dd5fe2006d26fca4fcd5c07d660c34f0835f510.tar.bz2
Make sure that the layout-override parser grabs the size, not the data
size. Otherwise, we can end up with bogus layouts. llvm-svn: 149703
Diffstat (limited to 'clang/lib/Frontend/LayoutOverrideSource.cpp')
-rw-r--r--clang/lib/Frontend/LayoutOverrideSource.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/LayoutOverrideSource.cpp b/clang/lib/Frontend/LayoutOverrideSource.cpp
index 3af2cc2..9cc0667 100644
--- a/clang/lib/Frontend/LayoutOverrideSource.cpp
+++ b/clang/lib/Frontend/LayoutOverrideSource.cpp
@@ -73,10 +73,10 @@ LayoutOverrideSource::LayoutOverrideSource(llvm::StringRef Filename) {
}
// Check for the size of the type.
- StringRef::size_type Pos = LineStr.find("Size:");
+ StringRef::size_type Pos = LineStr.find(" Size:");
if (Pos != StringRef::npos) {
- // Skip past the "Size:" prefix.
- LineStr = LineStr.substr(Pos + strlen("Size:"));
+ // Skip past the " Size:" prefix.
+ LineStr = LineStr.substr(Pos + strlen(" Size:"));
unsigned long long Size = 0;
(void)LineStr.getAsInteger(10, Size);