From 55bcea1e65ea97efb782314605f01e3bca9706d0 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Sun, 10 Jan 2010 12:58:08 +0000 Subject: Generalize target weirdness handling having proper layering in mind: 1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. llvm-svn: 93118 --- clang/lib/Frontend/PCHWriter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/Frontend/PCHWriter.cpp') diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp index 39e5d6f46bf..84a8a450b0c 100644 --- a/clang/lib/Frontend/PCHWriter.cpp +++ b/clang/lib/Frontend/PCHWriter.cpp @@ -1739,9 +1739,12 @@ void PCHWriter::WriteIdentifierTable(Preprocessor &PP) { void PCHWriter::WriteAttributeRecord(const Attr *Attr) { RecordData Record; for (; Attr; Attr = Attr->getNext()) { - Record.push_back(Attr->getKind()); // FIXME: stable encoding + Record.push_back(Attr->getKind()); // FIXME: stable encoding, target attrs Record.push_back(Attr->isInherited()); switch (Attr->getKind()) { + default: + assert(0 && "Does not support PCH writing for this attribute yet!"); + break; case Attr::Alias: AddString(cast(Attr)->getAliasee(), Record); break; -- cgit v1.2.3