<commit_before>//===-- llvm/CodeGen/MachineDebugInfo.h -------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file was developed by <NAME> and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Collect debug information for a module.  This information should be in a
// neutral form that can be used by different debugging schemes.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CODEGEN_MACHINEDEBUGINFO_H
#define LLVM_CODEGEN_MACHINEDEBUGINFO_H

#include "llvm/Pass.h"
#include <string>
#include <map>
#include <vector>

namespace llvm {
//===----------------------------------------------------------------------===//
/// MachineDebugInfo - This class contains debug information specific to a
/// module.  Queries can be made by different debugging schemes and reformated
/// for specific use.
///
class MachineDebugInfo : public ImmutablePass {
private:
  // convenience types
  typedef std::map<std::string, unsigned> StrIntMap;
  typedef StrIntMap::iterator StrIntMapIter;
  
  StrIntMap SourceMap;                  // Map of source file path to id
  unsigned SourceCount;                 // Number of source files (used to
                                        // generate id)
  unsigned UniqueID;                    // Number used to unique labels used
                                        // by debugger.

public:
  // Ctor.
  MachineDebugInfo()
  : SourceMap()
  , SourceCount(0)
  , UniqueID(1)
  {}
  ~MachineDebugInfo() { }
  
  /// NextUniqueID - Returns a unique number for labels used by debugger.
  ///
  unsigned NextUniqueID() { return UniqueID++; }
  
  bool doInitialization();
  bool doFinalization();
  unsigned RecordSource(std::string fname, std::string dirname);
  std::vector<std::string> getSourceFiles();
  
}; // End class MachineDebugInfo
//===----------------------------------------------------------------------===//

// FIXME - temporary hack until we can find a place to hang debug info from.
MachineDebugInfo &getMachineDebugInfo();

// FIXME - temporary hack until we can find a place to hand debug info from.
ModulePass *createDebugInfoPass();
<commit_msg>Add flag for debug presence.<commit_after>//===-- llvm/CodeGen/MachineDebugInfo.h -------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file was developed by <NAME> and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Collect debug information for a module.  This information should be in a
// neutral form that can be used by different debugging schemes.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CODEGEN_MACHINEDEBUGINFO_H
#define LLVM_CODEGEN_MACHINEDEBUGINFO_H

#include "llvm/Pass.h"
#include <string>
#include <map>
#include <vector>

namespace llvm {
//===----------------------------------------------------------------------===//
/// MachineDebugInfo - This class contains debug information specific to a
/// module.  Queries can be made by different debugging schemes and reformated
/// for specific use.
///
class MachineDebugInfo : public ImmutablePass {
private:
  // convenience types
  typedef std::map<std::string, unsigned> StrIntMap;
  typedef StrIntMap::iterator StrIntMapIter;
  
  StrIntMap SourceMap;                  // Map of source file path to id
  unsigned SourceCount;                 // Number of source files (used to
                                        // generate id)
  unsigned UniqueID;                    // Number used to unique labels used
                                        // by debugger.

public:
  // Ctor.
  MachineDebugInfo()
  : SourceMap()
  , SourceCount(0)
  , UniqueID(1)
  {}
  ~MachineDebugInfo() { }
  
  /// hasInfo - Returns true if debug info is present.
  ///
  // FIXME - need scheme to suppress debug output.
  bool hasInfo() { return true; }
  
  /// NextUniqueID - Returns a unique number for labels used by debugger.
  ///
  unsigned NextUniqueID() { return UniqueID++; }
  
  bool doInitialization();
  bool doFinalization();
  unsigned RecordSource(std::string fname, std::string dirname);
  std::vector<std::string> getSourceFiles();
  
}; // End class MachineDebugInfo
//===----------------------------------------------------------------------===//

// FIXME - temporary hack until we can find a place to hang debug info from.
MachineDebugInfo &getMachineDebugInfo();

// FIXME - temporary hack until we can find a place to hand debug info from.
ModulePass *createDebugInfoPass();

{'fraction_non_alphanumeric': 0.22652388797364087, 'fraction_numerical': 0.0008237232289950577, 'mean_word_length': 1.7179630665920538, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3733521', 'n_tokens_mistral': 1159, 'n_tokens_neox': 1157, 'n_words': 417}