Skip to content

Conversation

@bixia1
Copy link
Contributor

@bixia1 bixia1 commented Dec 23, 2024

Remove an assertion on this pointer, as it triggers this error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true.

@llvmbot llvmbot added mlir:core MLIR Core Infrastructure mlir labels Dec 23, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 23, 2024

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-core

Author: Bixia Zheng (bixia1)

Changes

Remove an assertion on this pointer, as it triggers this error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true.


Full diff: https://github.com/llvm/llvm-project/pull/120990.diff

1 Files Affected:

  • (modified) mlir/lib/Transforms/Utils/DialectConversion.cpp (-1)
diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index 51686646a0a2fc..255b0ba2559ee6 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -2843,7 +2843,6 @@ void TypeConverter::SignatureConversion::remapInput(unsigned origInputNo,
 
 LogicalResult TypeConverter::convertType(Type t,
                                          SmallVectorImpl<Type> &results) const {
-  assert(this && "expected non-null type converter");
   assert(t && "expected non-null type");
 
   {

@matthias-springer
Copy link
Member

This is giving a compiler warning, right? I wanted to have it to make debugging easier, but I’m going to find another way.

@bixia1 bixia1 closed this Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mlir:core MLIR Core Infrastructure mlir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants