[PATCH] D100051: [clang] Move int <-> float scalar conversion to a separate function
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 7 11:30:05 PDT 2021
erichkeane added inline comments.
================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1209
+ if (isa<llvm::IntegerType>(DstTy))
+ Res = Builder.CreateIntCast(Src, DstTy, InputSigned, "conv");
+ else if (InputSigned)
----------------
fhahn wrote:
> now that' this is a separate function, we should be able to just return the created value directly, right? There should be no need for `Res`
Yep, I'd also prefer multiple returns. That also cleans up a bunch of hte 'else's in this function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100051/new/
https://reviews.llvm.org/D100051
More information about the cfe-commits
mailing list