diff options
| author | David Blaikie <dblaikie@gmail.com> | 2018-11-15 03:04:21 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2018-11-15 03:04:21 +0000 |
| commit | 1013fe7451b6081720f48291b877d2606ff905f1 (patch) | |
| tree | 8023f7072a455890ef2ce46f89e1827a913b3434 /llvm/lib/XRay/FileHeaderReader.cpp | |
| parent | a99b8e4c355a715c9311a7ecadb3198b008fe2ff (diff) | |
| download | bcm5719-llvm-1013fe7451b6081720f48291b877d2606ff905f1.tar.gz bcm5719-llvm-1013fe7451b6081720f48291b877d2606ff905f1.zip | |
Fix combining pragma __debug dump & parser_crash with -E
Previously these would be transformed into annotation tokens and the
preprocessor would then assume they were real tokens with source
locations and assert/UB.
Other pragmas that produce annotation tokens aren't a problem because
they aren't handled if the parser isn't hooked up - ParsePragma.cpp
registers those handlers & isn't run for pure preprocessing. So they're
treated as unknown pragmas & printed verbatim by the preprocessor.
Perhaps these pragmas should be treated the same way? But they got mixed
in with other __debug pragmas that do need to be handled during
preprocessing.
The third __debug pragma that produces an annotation token is 'captured'
- which had its own fix for this issue - by not inserting the annotation
token in the first place if it detected that it was in preprocessing
mode. I've removed that fix (from Lex/Pragma.cpp) in favor of the more
general one in Frontend/PrintPreprocessedOutput.cpp.
llvm-svn: 346928
Diffstat (limited to 'llvm/lib/XRay/FileHeaderReader.cpp')
0 files changed, 0 insertions, 0 deletions

