BitcodeCommon.h 1.0 KB

123456789101112131415161718192021222324252627282930
  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. #ifndef LLVM_BITCODE_BITCODECOMMON_H
  14. #define LLVM_BITCODE_BITCODECOMMON_H
  15. #include "llvm/ADT/Bitfields.h"
  16. namespace llvm {
  17. struct AllocaPackedValues {
  18. using Align = Bitfield::Element<unsigned, 0, 5>;
  19. using UsedWithInAlloca = Bitfield::Element<bool, Align::NextBit, 1>;
  20. using ExplicitType = Bitfield::Element<bool, UsedWithInAlloca::NextBit, 1>;
  21. using SwiftError = Bitfield::Element<bool, ExplicitType::NextBit, 1>;
  22. };
  23. } // namespace llvm
  24. #endif // LLVM_BITCODE_BITCODECOMMON_H