[all-commits] [llvm/llvm-project] d4df38: [mlir] don't drop undef initializers in translatio...

ftynse via All-commits all-commits at lists.llvm.org
Fri Jul 9 08:52:59 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4df3825bd32277074b3859f5dea9593139147fb
      https://github.com/llvm/llvm-project/commit/d4df3825bd32277074b3859f5dea9593139147fb
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2021-07-09 (Fri, 09 Jul 2021)

  Changed paths:
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Target/LLVMIR/llvmir.mlir

  Log Message:
  -----------
  [mlir] don't drop undef initializers in translation to LLVM IR

LLVM IR allows globals with external linkage to have initializers, including
undef. The translation was incorrectly using undef as a indicator that the
initializer should be ignored in translation, leading to the impossibility to
create an external global with an explicit undef initializer. Fix this and use
nullptr as a marker instead.

Reviewed By: wsmoses

Differential Revision: https://reviews.llvm.org/D105631




More information about the All-commits mailing list