Consolidate codes dealing with LLVM struct type