diff options
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/Compiler.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index c7fb5e8..96ae1f5 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -4107,11 +4107,8 @@ template <class Emitter> bool Compiler<Emitter>::visitBool(const Expr *E) { return true; // Convert pointers to bool. - if (T == PT_Ptr) { - if (!this->emitNull(*T, 0, nullptr, E)) - return false; - return this->emitNE(*T, E); - } + if (T == PT_Ptr) + return this->emitIsNonNullPtr(E); // Or Floats. if (T == PT_Float) |