blob: a01fa742101014c87bb6cd7131d3bbd8e6cb2b14 [file] [log] [blame]
RoseZhang0357d3d072024-06-26 20:06:21 +00001#!/usr/bin/env python
2#
3# ====-- Enumeration class for libc function headers ----------*- python -*--==#
4#
5# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
6# See https://llvm.org/LICENSE.txt for license information.
7# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8#
9# ==-------------------------------------------------------------------------==#
10
11
12class Enumeration:
aaryanshukla6aed0d52024-07-03 14:29:51 -070013 def __init__(self, name, value):
RoseZhang0357d3d072024-06-26 20:06:21 +000014 self.name = name
15 self.value = value
16
17 def __str__(self):
18 if self.value != None:
19 return f"{self.name} = {self.value}"
20 else:
21 return f"{self.name}"