llvm2alive: allow any constant in constant aggregate
MODIFY
llvm_util/llvm2alive.cpp
llvm_util/llvm2alive.cpp
@@ -673,6 +673,7 @@ public:
optional<Function> run() {
constexpr_idx = 0;
+ copy_idx = 0;
auto type = llvm_type2alive(f.getReturnType());
if (!type)

MODIFY
llvm_util/utils.cpp
llvm_util/utils.cpp
@@ -317,8 +317,7 @@ Value* get_operand(llvm::Value *v,
auto val = make_unique<AggregateValue>(*ty, move(vals));
auto ret = val.get();
if (all_of(cnst->op_begin(), cnst->op_end(), [](auto &V) -> bool
- { return llvm::isa<llvm::UndefValue>(V) ||
- llvm::isa<llvm::ConstantInt>(V); })) {
+ { return llvm::isa<llvm::ConstantData>(V); })) {
current_fn->addConstant(move(val));
return ret;
} else {

llvm2alive: allow any constant in constant aggregate