Skip to content

Commit 0009c75

Browse files
committed
[Clang] fix for heterogeneous chip's host side's MaybeODRUseExprs clear
1 parent 56600c1 commit 0009c75

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clang/lib/Sema/SemaStmtAsm.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,12 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple,
240240
Expr *asmString, MultiExprArg clobbers,
241241
unsigned NumLabels,
242242
SourceLocation RParenLoc) {
243+
struct _Cleaner {
244+
Sema &S;
245+
~_Cleaner() {
246+
S.DiscardCleanupsInEvaluationContext();
247+
}
248+
} _C{*this};
243249
unsigned NumClobbers = clobbers.size();
244250
StringLiteral **Constraints =
245251
reinterpret_cast<StringLiteral**>(constraints.data());

0 commit comments

Comments
 (0)