================
@@ -1990,21 +2028,56 @@ static bool canConvertValue(const DataLayout &DL, Type
*OldTy, Type *NewTy) {
static Value *convertValue(const DataLayout &DL, IRBuilderTy &IRB, Value *V,
Type *NewTy) {
Type *OldTy = V->getType();
- assert(canConvertValue(DL, OldTy, NewTy) && "Value not convertable to type");
+
+#ifndef NDEBUG
+ BasicBlock *BB = IRB.GetInsertBlock();
+ assert(BB && BB->getParent() && "VScale unknown!");
----------------
paulwalker-arm wrote:
Yes. My reasoning was that saying "Function* not available" is obvious from
the code and the only reason we need the Function* is to read VScale, so I went
with this.
https://github.com/llvm/llvm-project/pull/130973
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits