1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "banjo/attributes.h"
6 
7 namespace banjo {
8 
HasSimpleLayout(const flat::Decl * decl)9 bool HasSimpleLayout(const flat::Decl* decl) {
10     return decl->GetAttribute("Layout") == "Simple";
11 }
12 
IsDefaultProtocol(const flat::Decl * decl)13 bool IsDefaultProtocol(const flat::Decl* decl) {
14     return decl->GetAttribute("Layout") == "ddk-protocol" &&
15            decl->HasAttribute("DefaultProtocol");
16 }
17 
18 } // namespace banjo
19