<commit_before>//===--- SILRemarkStreamer.h - Interface for streaming remarks --*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
/// \file
/// This file defines the interface used to stream SIL optimization diagnostics
/// through LLVM's RemarkStreamer interface.
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_SIL_SILREMARKSTREAMER_H
#define SWIFT_SIL_SILREMARKSTREAMER_H

#include "swift/Basic/SourceManager.h"
#include "swift/SIL/OptimizationRemark.h"
#include "llvm/Remarks/RemarkStreamer.h"

namespace swift {

class SILRemarkStreamer {
private:
  enum class Owner {
    SILModule,
    LLVM,
  } owner;

  /// The underlying LLVM streamer.
  ///
  /// If owned by a SILModule, this will be non-null.
  std::unique_ptr<llvm::remarks::RemarkStreamer> streamer;
  /// The owning LLVM context.
  ///<commit_msg>[next] Add missing include<commit_after>//===--- SILRemarkStreamer.h - Interface for streaming remarks --*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
/// \file
/// This file defines the interface used to stream SIL optimization diagnostics
/// through LLVM's RemarkStreamer interface.
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_SIL_SILREMARKSTREAMER_H
#define SWIFT_SIL_SILREMARKSTREAMER_H

#include "swift/Basic/SourceManager.h"
#include "swift/SIL/OptimizationRemark.h"
#include "llvm/Remarks/Remark.h"
#include "llvm/Remarks/RemarkStreamer.h"

namespace swift {

class SILRemarkStreamer {
private:
  enum class Owner {
    SILModule,
    LLVM,
  } owner;

  /// The underlying LLVM streamer.
  ///
  /// If owned by a SILModule, this will be non-null.
  std::unique_ptr<llvm::remarks::RemarkStreamer> streamer;
  /// The owning LLVM context.
  ///
{'fraction_non_alphanumeric': 0.23166023166023167, 'fraction_numerical': 0.007722007722007722, 'mean_word_length': 2.1869618696186963, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '3295859', 'n_tokens_mistral': 768, 'n_tokens_neox': 720, 'n_words': 221}