aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/BinaryFormat/Magic.cpp
diff options
context:
space:
mode:
authorJean Perier <jperier@nvidia.com>2021-03-25 09:40:42 +0100
committerJean Perier <jperier@nvidia.com>2021-03-25 09:53:58 +0100
commitffa455d4d45168bd30abef036f0f9c8b570c9941 (patch)
tree1ae6d87c335c944942c93fba1e1e7500be23a003 /llvm/lib/BinaryFormat/Magic.cpp
parent74ed5124bae163c2046d589026cf17f4fa71f6f4 (diff)
downloadllvm-ffa455d4d45168bd30abef036f0f9c8b570c9941.zip
llvm-ffa455d4d45168bd30abef036f0f9c8b570c9941.tar.gz
llvm-ffa455d4d45168bd30abef036f0f9c8b570c9941.tar.bz2
[mlir] Translate global initializers after creating all LLVM IR globals
In case an operation in a global initializer region refers to another global variable defined afterwards in the module of itself, translation to LLVM IR was currently crashing because it could not find the LLVM IR global when going through the initializer block. To solve this problem, split global conversion to LLVM IR into two passes. A first pass that creates LLVM IR global variables, and a second one that converts the initializer, if any, and adds it to the llvm global. Differential Revision: https://reviews.llvm.org/D99246
Diffstat (limited to 'llvm/lib/BinaryFormat/Magic.cpp')
0 files changed, 0 insertions, 0 deletions