diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-20 15:39:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-20 15:39:42 +0000 |
commit | 81d3466d037dc5844234c7a93dab21a6ad986e7d (patch) | |
tree | 96500ef0d904af631151e38ae92ce41b8e498a7d /lib/Frontend | |
parent | a4f0a80e7367bad218ffe1f8ab1b380f690276ce (diff) |
Keep proper source location information for the type in an Objective-C
@encode expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/PCHReaderStmt.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/PCHWriterStmt.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp index 2c954a68ac..60318dee77 100644 --- a/lib/Frontend/PCHReaderStmt.cpp +++ b/lib/Frontend/PCHReaderStmt.cpp @@ -725,7 +725,7 @@ unsigned PCHStmtReader::VisitObjCStringLiteral(ObjCStringLiteral *E) { unsigned PCHStmtReader::VisitObjCEncodeExpr(ObjCEncodeExpr *E) { VisitExpr(E); - E->setEncodedType(Reader.GetType(Record[Idx++])); + E->setEncodedTypeSourceInfo(Reader.GetTypeSourceInfo(Record, Idx)); E->setAtLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); E->setRParenLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); return 0; diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp index 9a5417ca61..9c9f891115 100644 --- a/lib/Frontend/PCHWriterStmt.cpp +++ b/lib/Frontend/PCHWriterStmt.cpp @@ -655,7 +655,7 @@ void PCHStmtWriter::VisitObjCStringLiteral(ObjCStringLiteral *E) { void PCHStmtWriter::VisitObjCEncodeExpr(ObjCEncodeExpr *E) { VisitExpr(E); - Writer.AddTypeRef(E->getEncodedType(), Record); + Writer.AddTypeSourceInfo(E->getEncodedTypeSourceInfo(), Record); Writer.AddSourceLocation(E->getAtLoc(), Record); Writer.AddSourceLocation(E->getRParenLoc(), Record); Code = pch::EXPR_OBJC_ENCODE; |