[PATCH] D33475: [pdb] pad source file name buffer at the end instead of the beginning
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 17:04:45 PDT 2017
zturner added inline comments.
================
Comment at: test/DebugInfo/PDB/Inputs/source-names-2.yaml:1-8
+---
+DbiStream:
+ Modules:
+ - Module: 'C:\src\test.obj'
+ ObjFile: 'C:\src\test.obj'
+ SourceFiles:
+ - 'C:\src\test.cc'
----------------
inglorion wrote:
> zturner wrote:
> > Instead of having two different yaml files that are largely similar, how about 1 file with multiple source files?
> >
> > ```
> > ---
> > DbiStream:
> > Modules:
> > - Module: 'C:\src\test.obj'
> > ObjFile: 'C:\src\test.obj'
> > SourceFiles:
> > - 'C:\src\test.c'
> > - 'C:\src\testx.c'
> > - 'C:\src\testxx.c'
> > - 'C:\src\testxxx.c'
> > ...
> > ```
> Wouldn't that run the risk of accidentally avoiding the problem? The bug this fixes is that we aligned the file names with the end of the file info substream (effectively putting 0-3 bytes of padding before the file names) instead of with the end of the previous field (effectively putting no padding before the file names and 0-3 bytes after). If we only have one test, that test could hit the case where the padding works out to 0 bytes and padding before cannot be distinguished from padding after. That's why I have two tests that only differ in the length of the file name.
Ok, yea makes sense.
https://reviews.llvm.org/D33475
More information about the llvm-commits
mailing list