using namespace clang;
using namespace CodeGen;
-#include "clang/Basic/Diagnostic.h"
-#include "CodeGenModule.h"
-
//===----------------------------------------------------------------------===//
// Statement Emission
//===----------------------------------------------------------------------===//
else
EmitAggExpr(E, 0, false);
} else {
-
- 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);
+ WarnUnsupported(S);
}
break;
case Stmt::NullStmtClass: break;
#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"
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);
+}
+
void EmitBlock(llvm::BasicBlock *BB);
+
+ /// WarnUnsupported - Print out a warning that codegen doesn't support the
+ /// specified stmt yet.
+ void WarnUnsupported(const Stmt *S);
//===--------------------------------------------------------------------===//
// Helpers