xref: /freebsd-src/contrib/llvm-project/llvm/include/llvm/Bitcode/BitcodeCommon.h (revision e8d8bef961a50d4dc22501cde4fb9fb0be1b2532)
1*e8d8bef9SDimitry Andric //===- BitcodeCommon.h - Common code for encode/decode   --------*- C++ -*-===//
2*e8d8bef9SDimitry Andric //
3*e8d8bef9SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*e8d8bef9SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*e8d8bef9SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*e8d8bef9SDimitry Andric //
7*e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===//
8*e8d8bef9SDimitry Andric //
9*e8d8bef9SDimitry Andric // This header defines common code to be used by BitcodeWriter and
10*e8d8bef9SDimitry Andric // BitcodeReader.
11*e8d8bef9SDimitry Andric //
12*e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===//
13*e8d8bef9SDimitry Andric 
14*e8d8bef9SDimitry Andric #ifndef LLVM_BITCODE_BITCODECOMMON_H
15*e8d8bef9SDimitry Andric #define LLVM_BITCODE_BITCODECOMMON_H
16*e8d8bef9SDimitry Andric 
17*e8d8bef9SDimitry Andric #include "llvm/ADT/Bitfields.h"
18*e8d8bef9SDimitry Andric 
19*e8d8bef9SDimitry Andric namespace llvm {
20*e8d8bef9SDimitry Andric 
21*e8d8bef9SDimitry Andric struct AllocaPackedValues {
22*e8d8bef9SDimitry Andric   using Align = Bitfield::Element<unsigned, 0, 5>;
23*e8d8bef9SDimitry Andric   using UsedWithInAlloca = Bitfield::Element<bool, Align::NextBit, 1>;
24*e8d8bef9SDimitry Andric   using ExplicitType = Bitfield::Element<bool, UsedWithInAlloca::NextBit, 1>;
25*e8d8bef9SDimitry Andric   using SwiftError = Bitfield::Element<bool, ExplicitType::NextBit, 1>;
26*e8d8bef9SDimitry Andric };
27*e8d8bef9SDimitry Andric 
28*e8d8bef9SDimitry Andric } // namespace llvm
29*e8d8bef9SDimitry Andric 
30*e8d8bef9SDimitry Andric #endif // LLVM_BITCODE_BITCODECOMMON_H
31