[PATCH] D108903: [llvm-reduce] Add reduce operands pass
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 8 11:33:02 PDT 2021
aeubanks added inline comments.
================
Comment at: llvm/lib/IR/Constants.cpp:32
#include <algorithm>
+#include <system_error>
----------------
remove
================
Comment at: llvm/lib/IR/Constants.cpp:388
// Function, Label, or Opaque type?
- llvm_unreachable("Cannot create a null constant of that type!");
+ return nullptr;
}
----------------
if we're going to return nullptr here there's no need for `Constant::hasNullValue`
also can you update the documentation saying that it'll return null for not supported types, and move it into Constant.h
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108903/new/
https://reviews.llvm.org/D108903
More information about the llvm-commits
mailing list