Use LLVMTypeOf() in output_data() to simplify type handling logic. Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Christopher Li <sparse@xxxxxxxxxxx> Cc: Jeff Garzik <jgarzik@xxxxxxxxxx> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx> --- sparse-llvm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sparse-llvm.c b/sparse-llvm.c index 9226a21..a39bc02 100644 --- a/sparse-llvm.c +++ b/sparse-llvm.c @@ -1192,7 +1192,7 @@ static LLVMValueRef output_data(LLVMModuleRef module, struct symbol *sym) name = show_ident(sym->ident); - data = LLVMAddGlobal(module, symbol_type(module, sym->ctype.base_type), name); + data = LLVMAddGlobal(module, LLVMTypeOf(initial_value), name); LLVMSetLinkage(data, data_linkage(sym)); -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html