<commit_before>//===-- ParameterAttributes.cpp - Implement ParameterAttrs ----------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements the ParamAttrsList class.
//
//===----------------------------------------------------------------------===//

#include "llvm/ParameterAttributes.h"
#include "llvm/Support/ManagedStatic.h"
using namespace llvm;

static ManagedStatic<FoldingSet<ParamAttrsList> > ParamAttrsLists;

ParamAttrsList::ParamAttrsList(const ParamAttrsVector &attrVec) 
  : attrs(attrVec), refCount(0) {
}

ParamAttrsList::~ParamAttrsList() {
  ParamAttrsLists->RemoveNode(this);
}

uint16_t
ParamAttrsList::getParamAttrs(uint16_t Index) const {
  unsigned limit = attrs.size();
  for (unsigned i = 0; i < limit && attrs[i].index <= Index; ++i)
    if (attrs[i].index == Index)
      return attrs[i].attrs;<commit_msg>Fix a compile error on Windows.<commit_after>//===-- ParameterAttributes.cpp - Implement ParameterAttrs ----------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements the ParamAttrsList class.
//
//===----------------------------------------------------------------------===//

#include "llvm/ParameterAttributes.h"
#include "llvm/Support/ManagedStatic.h"
#include <cassert>

using namespace llvm;

static ManagedStatic<FoldingSet<ParamAttrsList> > ParamAttrsLists;

ParamAttrsList::ParamAttrsList(const ParamAttrsVector &attrVec) 
  : attrs(attrVec), refCount(0) {
}

ParamAttrsList::~ParamAttrsList() {
  ParamAttrsLists->RemoveNode(this);
}

uint16_t
ParamAttrsList::getParamAttrs(uint16_t Index) const {
  unsigned limit = attrs.size();
  for (unsigned i = 0; i < limit && attrs[i].index <= Index; ++i)
    if (attrs[i].index == Index)
      return attrs[i].attrs;
{'fraction_non_alphanumeric': 0.2694063926940639, 'fraction_numerical': 0.005479452054794521, 'mean_word_length': 2.1661849710982657, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 10, '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': '5917549', 'n_tokens_mistral': 602, 'n_tokens_neox': 604, 'n_words': 142}