diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-02 07:19:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-02 07:19:18 +0000 |
commit | 2c8569d5f43f7de1fb993e84c95ea571dd9ac55e (patch) | |
tree | 891ec632e7acd573a5537b9df5054186cce30511 /CodeGen/CodeGenFunction.cpp | |
parent | 9cd4fe4af6d3e8b6dcfce9c2cdefcaafca7eed7c (diff) |
warn about unhandled initializers instead of crashing on them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | CodeGen/CodeGenFunction.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/CodeGen/CodeGenFunction.cpp b/CodeGen/CodeGenFunction.cpp index 3ee7d1f0fc..5cbd1958f4 100644 --- a/CodeGen/CodeGenFunction.cpp +++ b/CodeGen/CodeGenFunction.cpp @@ -14,7 +14,6 @@ #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" @@ -151,10 +150,6 @@ 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, const char *Type) { - unsigned DiagID = CGM.getDiags().getCustomDiagID(Diagnostic::Warning, - "cannot codegen this %0 yet"); - SourceRange Range = S->getSourceRange(); - std::string Msg = Type; - CGM.getDiags().Report(S->getLocStart(), DiagID, &Msg, 1, &Range, 1); + CGM.WarnUnsupported(S, Type); } |