diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-18 18:04:31 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-18 18:04:31 +0000 |
commit | ddf889a2ad2888f1dea573987bbe952d9912c1a0 (patch) | |
tree | 43aa47f24fb88adbd4a12ca959e103e6c27f16f6 /lib/Frontend/PCHWriter.cpp | |
parent | 3f693d25d44d342811b2c721206a8a54f06958d5 (diff) |
Improve source-location information for builtin TypeLocs, from Enea
Zaffanella (with a couple of my tweaks).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93733 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriter.cpp')
-rw-r--r-- | lib/Frontend/PCHWriter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp index 21e09744e3..97cd84f447 100644 --- a/lib/Frontend/PCHWriter.cpp +++ b/lib/Frontend/PCHWriter.cpp @@ -277,7 +277,13 @@ void TypeLocWriter::VisitQualifiedTypeLoc(QualifiedTypeLoc TL) { // nothing to do } void TypeLocWriter::VisitBuiltinTypeLoc(BuiltinTypeLoc TL) { - Writer.AddSourceLocation(TL.getNameLoc(), Record); + Writer.AddSourceLocation(TL.getBuiltinLoc(), Record); + if (TL.needsExtraLocalData()) { + Record.push_back(TL.getWrittenTypeSpec()); + Record.push_back(TL.getWrittenSignSpec()); + Record.push_back(TL.getWrittenWidthSpec()); + Record.push_back(TL.hasModeAttr()); + } } void TypeLocWriter::VisitComplexTypeLoc(ComplexTypeLoc TL) { Writer.AddSourceLocation(TL.getNameLoc(), Record); |