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 | c9b7a59b304c7a45636afd7328ed83ef1de7a9e2 (patch) | |
tree | 7b67edf12ee96cb15f8995f757aca50e4138ae85 /clang/lib/Frontend/PCHWriter.cpp | |
parent | e2aa06d4ae2a13fba5d782d9d8184184b4a2ba99 (diff) | |
download | bcm5719-llvm-c9b7a59b304c7a45636afd7328ed83ef1de7a9e2.tar.gz bcm5719-llvm-c9b7a59b304c7a45636afd7328ed83ef1de7a9e2.zip |
Improve source-location information for builtin TypeLocs, from Enea
Zaffanella (with a couple of my tweaks).
llvm-svn: 93733
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHWriter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp index 21e09744e35..97cd84f4471 100644 --- a/clang/lib/Frontend/PCHWriter.cpp +++ b/clang/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); |