Mercurial > hg > CbC > CbC_llvm
comparison lib/IR/DiagnosticPrinter.cpp @ 95:afa8332a0e37 LLVM3.8
LLVM 3.8
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 17:48:58 +0900 |
parents | 54457678186b |
children | 803732b1fca8 |
comparison
equal
deleted
inserted
replaced
84:f3e34b893a5f | 95:afa8332a0e37 |
---|---|
14 #include "llvm/ADT/Twine.h" | 14 #include "llvm/ADT/Twine.h" |
15 #include "llvm/IR/DiagnosticPrinter.h" | 15 #include "llvm/IR/DiagnosticPrinter.h" |
16 #include "llvm/IR/Module.h" | 16 #include "llvm/IR/Module.h" |
17 #include "llvm/IR/Value.h" | 17 #include "llvm/IR/Value.h" |
18 #include "llvm/Support/raw_ostream.h" | 18 #include "llvm/Support/raw_ostream.h" |
19 #include "llvm/Support/SourceMgr.h" | |
19 | 20 |
20 using namespace llvm; | 21 using namespace llvm; |
21 | 22 |
22 DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(char C) { | 23 DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(char C) { |
23 Stream << C; | 24 Stream << C; |
103 | 104 |
104 DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(const Module &M) { | 105 DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(const Module &M) { |
105 Stream << M.getModuleIdentifier(); | 106 Stream << M.getModuleIdentifier(); |
106 return *this; | 107 return *this; |
107 } | 108 } |
109 | |
110 // Other types. | |
111 DiagnosticPrinter &DiagnosticPrinterRawOStream:: | |
112 operator<<(const SMDiagnostic &Diag) { | |
113 // We don't have to print the SMDiagnostic kind, as the diagnostic severity | |
114 // is printed by the diagnostic handler. | |
115 Diag.print("", Stream, /*ShowColors=*/true, /*ShowKindLabel=*/false); | |
116 return *this; | |
117 } |