[PATCH] D141343: [AsmWriter] Don't crash when printing addrspace and the operand is null
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 10:57:23 PST 2023
arsenm added inline comments.
================
Comment at: llvm/lib/IR/AsmWriter.cpp:4019-4022
// We also print it if it is zero but not equal to the program address space
// or if we can't find a valid Module* to make it possible to parse
// the resulting file even without a datalayout string.
if (!Mod || Mod->getDataLayout().getProgramAddressSpace() != 0)
----------------
Drive by comment but this behavior is super annoying, it should just always print non-0 like everywhere else
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141343/new/
https://reviews.llvm.org/D141343
More information about the llvm-commits
mailing list