aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Compiler.cpp
diff options
context:
space:
mode:
authorTimm Baeder <tbaeder@redhat.com>2025-08-30 17:41:08 +0200
committerGitHub <noreply@github.com>2025-08-30 17:41:08 +0200
commit1bbac057f6de10db683e70c8c966809ad576b93e (patch)
treee4117cbb9a1036c92b134ffefe7c1b454938085d /clang/lib/AST/ByteCode/Compiler.cpp
parent62ff9ac4c68f48c089528105259c68943ab176de (diff)
downloadllvm-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.cpp2
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;