diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-02 01:43:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-02 01:43:38 +0000 |
commit | dc5e8268292046114ffe02e48773572a91a310f1 (patch) | |
tree | a01c99f0898cbbdc88471484c65c70640de0747d /CodeGen/CodeGenFunction.cpp | |
parent | fb97b03e42d397405f617be0252be83e77a66f6e (diff) |
move unsupported warning into a centralized place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | CodeGen/CodeGenFunction.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CodeGen/CodeGenFunction.cpp b/CodeGen/CodeGenFunction.cpp index 3602d60029..db5072be0b 100644 --- a/CodeGen/CodeGenFunction.cpp +++ b/CodeGen/CodeGenFunction.cpp @@ -14,6 +14,7 @@ #include "CodeGenFunction.h" #include "CodeGenModule.h" #include "clang/Basic/TargetInfo.h" +#include "clang/Basic/Diagnostic.h" #include "clang/AST/AST.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" @@ -143,3 +144,13 @@ const CGRecordLayout *CodeGenFunction::getCGRecordLayout(CodeGenTypes &CGT, return CGT.getCGRecordLayout(Ty); } + +/// WarnUnsupported - Print out a warning that codegen doesn't support the +/// specified stmt yet. +void CodeGenFunction::WarnUnsupported(const Stmt *S) { + unsigned DiagID = CGM.getDiags().getCustomDiagID(Diagnostic::Warning, + "cannot codegen this yet"); + SourceRange Range = S->getSourceRange(); + CGM.getDiags().Report(S->getLocStart(), DiagID, 0, 0, &Range, 1); +} + |