diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-03 19:31:51 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-03 19:31:51 +0000 |
commit | 285c6070cba54ab9bb1d3bacdc2028498a83baef (patch) | |
tree | 8b2b684034a36bcf61ffaf0ac2bc3fb5a0b1df76 /lib/Frontend/LayoutOverrideSource.cpp | |
parent | b70126a328f89937f46db42f9e3cba1592887c91 (diff) |
Make sure that the layout-override parser grabs the size, not the data
size. Otherwise, we can end up with bogus layouts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/LayoutOverrideSource.cpp')
-rw-r--r-- | lib/Frontend/LayoutOverrideSource.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Frontend/LayoutOverrideSource.cpp b/lib/Frontend/LayoutOverrideSource.cpp index 3af2cc2bbe..9cc0667850 100644 --- a/lib/Frontend/LayoutOverrideSource.cpp +++ b/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); |