From 4e9255f4ad5f87217995eeb488a7c5b336bb732d Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 27 May 2010 02:25:39 +0000 Subject: [PATCH] AST: Add AlignMac68kAttr, not yet used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104800 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Attr.h | 3 +++ lib/AST/AttrImpl.cpp | 1 + lib/Frontend/PCHReaderDecl.cpp | 1 + lib/Frontend/PCHWriter.cpp | 3 +++ 4 files changed, 8 insertions(+) diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h index 29b9d63545..3240e50b07 100644 --- a/include/clang/AST/Attr.h +++ b/include/clang/AST/Attr.h @@ -45,6 +45,7 @@ public: enum Kind { Alias, Aligned, + AlignMac68k, AlwaysInline, AnalyzerNoReturn, // Clang-specific. Annotate, @@ -207,6 +208,8 @@ public: static bool classof(const MaxFieldAlignmentAttr *A) { return true; } }; +DEF_SIMPLE_ATTR(AlignMac68k); + class AlignedAttr : public Attr { unsigned Alignment; public: diff --git a/lib/AST/AttrImpl.cpp b/lib/AST/AttrImpl.cpp index dbceeab6bd..0fab22cace 100644 --- a/lib/AST/AttrImpl.cpp +++ b/lib/AST/AttrImpl.cpp @@ -74,6 +74,7 @@ void NonNullAttr::Destroy(ASTContext &C) { // FIXME: Can we use variadic macro to define DEF_SIMPLE_ATTR_CLONE for // "non-simple" classes? +DEF_SIMPLE_ATTR_CLONE(AlignMac68k) DEF_SIMPLE_ATTR_CLONE(AlwaysInline) DEF_SIMPLE_ATTR_CLONE(AnalyzerNoReturn) DEF_SIMPLE_ATTR_CLONE(BaseCheck) diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp index 933034e7a0..1ef0441ebf 100644 --- a/lib/Frontend/PCHReaderDecl.cpp +++ b/lib/Frontend/PCHReaderDecl.cpp @@ -666,6 +666,7 @@ Attr *PCHReader::ReadAttributes() { assert(0 && "Unknown attribute!"); break; STRING_ATTR(Alias); + SIMPLE_ATTR(AlignMac68k); UNSIGNED_ATTR(Aligned); SIMPLE_ATTR(AlwaysInline); SIMPLE_ATTR(AnalyzerNoReturn); diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp index efa0e3741e..3d5b7d8156 100644 --- a/lib/Frontend/PCHWriter.cpp +++ b/lib/Frontend/PCHWriter.cpp @@ -1836,6 +1836,9 @@ void PCHWriter::WriteAttributeRecord(const Attr *Attr) { AddString(cast(Attr)->getAliasee(), Record); break; + case Attr::AlignMac68k: + break; + case Attr::Aligned: Record.push_back(cast(Attr)->getAlignment()); break; -- 2.49.0