Skip to content

Commit 2987464

Browse files
committed
Replace empty code with MissingFeature
1 parent a9a639f commit 2987464

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

clang/include/clang/CIR/MissingFeatures.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ struct MissingFeatures {
215215
static bool coverageMapping() { return false; }
216216
static bool peepholeProtection() { return false; }
217217
static bool instrumentation() { return false; }
218+
static bool cleanupAfterErrorDiags() { return false; }
218219

219220
// Missing types
220221
static bool dataMemberType() { return false; }

clang/lib/CIR/CodeGen/CIRGenerator.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,9 @@ void CIRGenerator::HandleTranslationUnit(ASTContext &astContext) {
7474
if (!diags.hasErrorOccurred() && cgm)
7575
cgm->release();
7676

77-
// If there are errors before or when releasing the CGM, reset the module to
77+
// If there are errors before or when releasing the cgm, reset the module to
7878
// stop here before invoking the backend.
79-
if (diags.hasErrorOccurred()) {
80-
if (cgm)
81-
// TODO: cgm->clear();
82-
return;
83-
}
79+
assert(!cir::MissingFeatures::cleanupAfterErrorDiags());
8480
}
8581

8682
void CIRGenerator::HandleInlineFunctionDefinition(FunctionDecl *d) {

0 commit comments

Comments
 (0)