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 | fc94434fafd39d8cb709a449ec1b0671559f282c (patch) | |
tree | b8cb8d7d4124879260dedaf159edf47699567a82 /clang/CodeGen/CodeGenFunction.cpp | |
parent | c8dbe1e5d6560b40346e4d35e815b595dd024700 (diff) | |
download | bcm5719-llvm-fc94434fafd39d8cb709a449ec1b0671559f282c.tar.gz bcm5719-llvm-fc94434fafd39d8cb709a449ec1b0671559f282c.zip |
move unsupported warning into a centralized place.
llvm-svn: 44502
Diffstat (limited to 'clang/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/CodeGen/CodeGenFunction.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/CodeGen/CodeGenFunction.cpp b/clang/CodeGen/CodeGenFunction.cpp index 3602d60029b..db5072be0b9 100644 --- a/clang/CodeGen/CodeGenFunction.cpp +++ b/clang/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); +} + |