aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHReader.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-15 18:43:11 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-15 18:43:11 +0000
commit6a2bfb2ead4489db37e80b696a6d7cc073c76fd7 (patch)
tree6b1ce991a50f8e096efbff6c2cd38646289ac60b /lib/Frontend/PCHReader.cpp
parent16e48ff5e9c72101904d4422accd91c59f9f653f (diff)
PCH support for the string literal of a FileScopeAsmDecl.
Some minor cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69196 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReader.cpp')
-rw-r--r--lib/Frontend/PCHReader.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index 5a01aee8b8..983c2b8807 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -188,7 +188,7 @@ void PCHDeclReader::VisitOriginalParmVarDecl(OriginalParmVarDecl *PD) {
void PCHDeclReader::VisitFileScopeAsmDecl(FileScopeAsmDecl *AD) {
VisitDecl(AD);
- // FIXME: read asm string
+ AD->setAsmString(cast<StringLiteral>(Reader.ReadExpr()));
}
void PCHDeclReader::VisitBlockDecl(BlockDecl *BD) {
@@ -593,6 +593,7 @@ PCHReader::PCHReadResult PCHReader::ReadSourceManagerBlock() {
Record.clear();
unsigned RecCode = Stream.ReadRecord(Code, Record, &BlobStart, &BlobLen);
assert(RecCode == pch::SM_SLOC_BUFFER_BLOB && "Ill-formed PCH file");
+ (void)RecCode;
llvm::MemoryBuffer *Buffer
= llvm::MemoryBuffer::getMemBuffer(BlobStart,
BlobStart + BlobLen - 1,
@@ -1471,6 +1472,7 @@ bool PCHReader::ReadDeclsLexicallyInContext(DeclContext *DC,
RecordData Record;
unsigned Code = Stream.ReadCode();
unsigned RecCode = Stream.ReadRecord(Code, Record);
+ (void)RecCode;
assert(RecCode == pch::DECL_CONTEXT_LEXICAL && "Expected lexical block");
// Load all of the declaration IDs
@@ -1496,6 +1498,7 @@ bool PCHReader::ReadDeclsVisibleInContext(DeclContext *DC,
RecordData Record;
unsigned Code = Stream.ReadCode();
unsigned RecCode = Stream.ReadRecord(Code, Record);
+ (void)RecCode;
assert(RecCode == pch::DECL_CONTEXT_VISIBLE && "Expected visible block");
if (Record.size() == 0)
return false;