<commit_before>//===-- llvm/Target/TargetAsmInfo.h - Asm info ------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains a class to be used as the basis for target specific
// asm writers.  This class primarily takes care of global printing constants,
// which are used in very similar ways across all targets.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_TARGET_ASM_INFO_H
#define LLVM_TARGET_ASM_INFO_H

#include "llvm/ADT/StringMap.h"
#include "llvm/Support/DataTypes.h"
#include <string>

namespace llvm {
  // DWARF encoding query type
  namespace DwarfEncoding {
    enum Target {
      Data       = 0,
      CodeLabels = 1,
      Functions  = 2
    };
  }

  namespace SectionKind {
    enum Kind {
      Unknown = 0,      ///< Custom section
      Text,             ///< Text section
      Data,             ///< Data section
      BSS,              ///< BSS section
      ROData,           ///< Readonly data section
      RODataMergeStr,   ///< Readonly data section (mergeable strings)
      RODataMergeConst, ///< Readonly data section (mergeable constants)
      ThreadData,       ///< Initialized TLS data objects
      ThreadBSS         ///< Uninitialized TLS data objects
    };
  }

  namespace SectionFlags {
    enum Flags {
      Invalid    = -1UL,
      None       = 0,
      Code       = 1 << 0,    ///< Section contains code
      Writeable  = 1 << 1,    ///< Section is writeable
      BSS        = 1 << 2,    ///< Section contains only zeroes
      Mergeable  = 1 << 3,    ///< Section contains mergeable data
      Strings    = 1 << 4,    ///< Section contains null-terminated strings
      TLS        = 1 << 5,    ///< Section contains thread-local data
      Debug      = 1 << 6,    ///< Section contains debug data
      Linkonce   = 1 << 7,    ///< Section is linkonce
      TypeFlags  = 0xFF,
      // Some gap for future flags
      Named      = 1 << 23,    ///< Section is named
      EntitySize = 0xFF << 24 ///< Entity size for mergeable sections
    };

    static inline unsigned getEntitySize(unsigned Flags) {
      return (Flags >> 24) & 0xFF;
    }<commit_msg>Drop enum and use constants for SectionFlags<commit_after>//===-- llvm/Target/TargetAsmInfo.h - Asm info ------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains a class to be used as the basis for target specific
// asm writers.  This class primarily takes care of global printing constants,
// which are used in very similar ways across all targets.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_TARGET_ASM_INFO_H
#define LLVM_TARGET_ASM_INFO_H

#include "llvm/ADT/StringMap.h"
#include "llvm/Support/DataTypes.h"
#include <string>

namespace llvm {
  // DWARF encoding query type
  namespace DwarfEncoding {
    enum Target {
      Data       = 0,
      CodeLabels = 1,
      Functions  = 2
    };
  }

  namespace SectionKind {
    enum Kind {
      Unknown = 0,      ///< Custom section
      Text,             ///< Text section
      Data,             ///< Data section
      BSS,              ///< BSS section
      ROData,           ///< Readonly data section
      RODataMergeStr,   ///< Readonly data section (mergeable strings)
      RODataMergeConst, ///< Readonly data section (mergeable constants)
      ThreadData,       ///< Initialized TLS data objects
      ThreadBSS         ///< Uninitialized TLS data objects
    };
  }

  namespace SectionFlags {
    const unsigned Invalid    = -1UL;
    const unsigned None       = 0;
    const unsigned Code       = 1 << 0;  ///< Section contains code
    const unsigned Writeable  = 1 << 1;  ///< Section is writeable
    const unsigned BSS        = 1 << 2;  ///< Section contains only zeroes
    const unsigned Mergeable  = 1 << 3;  ///< Section contains mergeable data
    const unsigned Strings    = 1 << 4;  ///< Section contains C-type strings
    const unsigned TLS        = 1 << 5;  ///< Section contains thread-local data
    const unsigned Debug      = 1 << 6;  ///< Section contains debug data
    const unsigned Linkonce   = 1 << 7;  ///< Section is linkonce
    const unsigned TypeFlags  = 0xFF;
    // Some gap for future flags
    const unsigned Named      = 1 << 23; ///< Section is named
    const unsigned EntitySize = 0xFF << 24; ///< Entity size for mergeable stuff

    static inline unsigned getEntitySize(unsigned Flags) {
      return (Flags >> 24) & 0xFF;
    }
{'fraction_non_alphanumeric': 0.168543845534996, 'fraction_numerical': 0.012872083668543845, 'mean_word_length': 1.6340042372881356, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5198212', 'n_tokens_mistral': 1364, 'n_tokens_neox': 1276, 'n_words': 470}