[PATCH] D60613: Make setInitializer() assert that the entire initializer is usable.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 18:58:37 PDT 2019
efriedma added inline comments.
================
Comment at: llvm/lib/IR/Globals.cpp:386
+#ifndef NDEBUG
+ if(ConstantStruct *V = dyn_cast<ConstantStruct>(Value)) {
+ for(int I = 0, N = V->getNumOperands(); I != N; ++I)
----------------
Please clang-format this.
Can you check for ConstantAggregate here, instead of checking ConstantStruct and ConstantArray separately? Would it also make sense to check for ConstantExpr?
Can you use a for-range loop here? (`for (auto *Op : V->operands())`)
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60613/new/
https://reviews.llvm.org/D60613
More information about the llvm-commits
mailing list