[PATCH] D139067: [FuzzMutate] New InsertCFGStrategy

Peter Rong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 12:12:16 PST 2022


Peter added inline comments.


================
Comment at: llvm/lib/FuzzMutate/IRMutator.cpp:344
+                 "setting correct?");
+    IntegerType *Ty = static_cast<IntegerType *>(RS.getSelection());
+    uint64_t BitSize = Ty->getBitWidth();
----------------
arsenm wrote:
> cast<>? I don't see  what RS really is
RS returns a `Type*`, but because we used a filter `isIntegerType`, we can be sure that the result must be an `IntegerType`.

We can add a dynamic cast and check for the sake of readability, but it seems to me its un-necessary runtime overhead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139067/new/

https://reviews.llvm.org/D139067



More information about the llvm-commits mailing list