convert the rest of the stderr users in codegen to use diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44503 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CodeGenFunction.cpp b/CodeGen/CodeGenFunction.cpp
index db5072b..0da5fcd 100644
--- a/CodeGen/CodeGenFunction.cpp
+++ b/CodeGen/CodeGenFunction.cpp
@@ -147,10 +147,11 @@
/// WarnUnsupported - Print out a warning that codegen doesn't support the
/// specified stmt yet.
-void CodeGenFunction::WarnUnsupported(const Stmt *S) {
+void CodeGenFunction::WarnUnsupported(const Stmt *S, const char *Type) {
unsigned DiagID = CGM.getDiags().getCustomDiagID(Diagnostic::Warning,
- "cannot codegen this yet");
+ "cannot codegen this %0 yet");
SourceRange Range = S->getSourceRange();
- CGM.getDiags().Report(S->getLocStart(), DiagID, 0, 0, &Range, 1);
+ std::string Msg = Type;
+ CGM.getDiags().Report(S->getLocStart(), DiagID, &Msg, 1, &Range, 1);
}