From 38376f159513e5041d04e7cc8b5c62d59e8fa9d0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 12 Jan 2008 07:05:38 +0000 Subject: Add first pieces of support for parsing and representing extern "C" in C++ mode. Patch by Mike Stump! llvm-svn: 45904 --- clang/CodeGen/CodeGenModule.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'clang/CodeGen/CodeGenModule.cpp') diff --git a/clang/CodeGen/CodeGenModule.cpp b/clang/CodeGen/CodeGenModule.cpp index 9a65d2e2967..bb61dc7cd82 100644 --- a/clang/CodeGen/CodeGenModule.cpp +++ b/clang/CodeGen/CodeGenModule.cpp @@ -44,6 +44,16 @@ void CodeGenModule::WarnUnsupported(const Stmt *S, const char *Type) { &Msg, 1, &Range, 1); } +/// WarnUnsupported - Print out a warning that codegen doesn't support the +/// specified decl yet. +void CodeGenModule::WarnUnsupported(const Decl *D, const char *Type) { + unsigned DiagID = getDiags().getCustomDiagID(Diagnostic::Warning, + "cannot codegen this %0 yet"); + std::string Msg = Type; + getDiags().Report(Context.getFullLoc(D->getLocation()), DiagID, + &Msg, 1); +} + /// ReplaceMapValuesWith - This is a really slow and bad function that /// searches for any entries in GlobalDeclMap that point to OldVal, changing /// them to point to NewVal. This is badbadbad, FIXME! -- cgit v1.2.3