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