diff options
author | Timm Baeder <tbaeder@redhat.com> | 2025-08-30 17:41:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-30 17:41:08 +0200 |
commit | 1bbac057f6de10db683e70c8c966809ad576b93e (patch) | |
tree | e4117cbb9a1036c92b134ffefe7c1b454938085d /clang/lib/AST/ByteCode/Compiler.cpp | |
parent | 62ff9ac4c68f48c089528105259c68943ab176de (diff) | |
download | llvm-1bbac057f6de10db683e70c8c966809ad576b93e.zip llvm-1bbac057f6de10db683e70c8c966809ad576b93e.tar.gz llvm-1bbac057f6de10db683e70c8c966809ad576b93e.tar.bz2 |
[clang][bytecode] Fix ignoring comparisons in C (#156180)
Our comparison ops always return bool, and we do the pop before the
conversion to in in C.
Fixes #156178
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/Compiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index c314f0a..56552f3 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -942,7 +942,7 @@ bool Compiler<Emitter>::VisitBinaryOperator(const BinaryOperator *BO) { if (!Result) return false; if (DiscardResult) - return this->emitPop(*T, BO); + return this->emitPopBool(BO); if (T != PT_Bool) return this->emitCast(PT_Bool, *T, BO); return true; |