microsoft/qdk
Publicmirrored from https://github.com/microsoft/qdkAvailable
source/compiler/qsc_data_structures/src/attrs.rs
20lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | use bitflags::bitflags; |
| 5 | |
| 6 | bitflags! { |
| 7 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] |
| 8 | /// QIR attributes used during codegen. |
| 9 | pub struct Attributes: u32 { |
| 10 | const EntryPoint = 0b_0001; |
| 11 | const Irreversible = 0b_0010; |
| 12 | const QdkNoise = 0b_0100; |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | impl Default for Attributes { |
| 17 | fn default() -> Self { |
| 18 | Attributes::EntryPoint | Attributes::Irreversible |
| 19 | } |
| 20 | } |
| 21 | |