From dc4d280136d3301fcbf3c7b4b2782c8bd804342c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 2 Dec 2007 01:49:16 +0000 Subject: 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 --- CodeGen/CodeGenFunction.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'CodeGen/CodeGenFunction.cpp') diff --git a/CodeGen/CodeGenFunction.cpp b/CodeGen/CodeGenFunction.cpp index db5072be0b..0da5fcdaaa 100644 --- a/CodeGen/CodeGenFunction.cpp +++ b/CodeGen/CodeGenFunction.cpp @@ -147,10 +147,11 @@ const CGRecordLayout *CodeGenFunction::getCGRecordLayout(CodeGenTypes &CGT, /// 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); } -- cgit v1.2.3-18-g5258