mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
b72c67b1b1
This reverts commit 20fff32b7d1f1a1bd417b22aa9f26ededd97a3e5. llvm-svn: 355976
29 lines
1.0 KiB
C++
29 lines
1.0 KiB
C++
//===- llvm/IR/RemarkStreamer.cpp - Remark Streamer -*- C++ -------------*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains the implementation of the remark outputting as part of
|
|
// LLVMContext.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/IR/RemarkStreamer.h"
|
|
|
|
using namespace llvm;
|
|
|
|
RemarkStreamer::RemarkStreamer(StringRef Filename, raw_ostream &OS)
|
|
: Filename(Filename), OS(OS),
|
|
YAMLOutput(OS, reinterpret_cast<void *>(this)) {
|
|
assert(!Filename.empty() && "This needs to be a real filename.");
|
|
}
|
|
|
|
void RemarkStreamer::emit(const DiagnosticInfoOptimizationBase &Diag) {
|
|
DiagnosticInfoOptimizationBase *DiagPtr =
|
|
const_cast<DiagnosticInfoOptimizationBase *>(&Diag);
|
|
YAMLOutput << DiagPtr;
|
|
}
|