diff --git a/libclambcc/ClamBCRebuild.cpp b/libclambcc/ClamBCRebuild.cpp index 2980909861..4df0d3e683 100644 --- a/libclambcc/ClamBCRebuild.cpp +++ b/libclambcc/ClamBCRebuild.cpp @@ -539,6 +539,12 @@ class ClamBCRebuild : public PassInfoMixin, public InstVisitorisIntegerTy()) { V = Builder->CreateBitCast(V, Ty, "ClamBCRebuild_cast"); } else if (Ty->isPointerTy()) { // A CompositeType + + /*This appears to be necessary for 0.103 on windows.*/ + if (Ty != i8pTy){ + V = Builder->CreatePointerCast(V, i8pTy, "ClamBCRebuild"); + } + V = Builder->CreatePointerCast(V, Ty, "ClamBCRebuild"); } else { stop("Type conversion unhandled in ClamAV Bytecode Backend Rebuilder", &I);