void PCHDeclReader::VisitFileScopeAsmDecl(FileScopeAsmDecl *AD) {
VisitDecl(AD);
- // FIXME: read asm string
+ AD->setAsmString(cast<StringLiteral>(Reader.ReadExpr()));
}
void PCHDeclReader::VisitBlockDecl(BlockDecl *BD) {
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,
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
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;
void
PCHTypeWriter::VisitTemplateSpecializationType(
const TemplateSpecializationType *T) {
- // FIXME: Serialize this type
+ // FIXME: Serialize this type (C++ only)
assert(false && "Cannot serialize template specialization types");
}
void PCHTypeWriter::VisitQualifiedNameType(const QualifiedNameType *T) {
- // FIXME: Serialize this type
+ // FIXME: Serialize this type (C++ only)
assert(false && "Cannot serialize qualified name types");
}
void PCHDeclWriter::VisitParmVarDecl(ParmVarDecl *D) {
VisitVarDecl(D);
Record.push_back(D->getObjCDeclQualifier()); // FIXME: stable encoding
- // FIXME: emit default argument
+ // FIXME: emit default argument (C++)
// FIXME: why isn't the "default argument" just stored as the initializer
// in VarDecl?
Code = pch::DECL_PARM_VAR;
void PCHDeclWriter::VisitFileScopeAsmDecl(FileScopeAsmDecl *D) {
VisitDecl(D);
- // FIXME: Emit the string literal
+ Writer.AddExpr(D->getAsmString());
Code = pch::DECL_FILE_SCOPE_ASM;
}