aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-06-25 22:14:37 +0200
committerNikita Popov <nikita.ppv@gmail.com>2021-06-29 20:10:31 +0200
commitf8aaec19e674c44bfffd2b31611ad1eecc4698bd (patch)
tree29d6613d2aec33814c348048ee0110838cf61202 /llvm/lib/CodeGen/MachineFunction.cpp
parent913229983633cd4c19b9e5534018f9a42e274b30 (diff)
downloadllvm-f8aaec19e674c44bfffd2b31611ad1eecc4698bd.zip
llvm-f8aaec19e674c44bfffd2b31611ad1eecc4698bd.tar.gz
llvm-f8aaec19e674c44bfffd2b31611ad1eecc4698bd.tar.bz2
[OpaquePtr] Support forward references in textual IR
Currently, LLParser will create a Function/GlobalVariable forward reference based on the desired pointer type and then modify it when it is declared. With opaque pointers, we generally do not know the correct type to use until we see the declaration. Solve this by creating the forward reference with a dummy type, and then performing a RAUW with the correct Function/GlobalVariable when it is declared. The approach is adopted from https://github.com/TNorthover/llvm-project/commit/b5b55963f62038319fa7a8b1b232226ba1d8ef3c. This results in a change to the use list order, which is why we see test changes on some module passes that are not stable under use list reordering. Differential Revision: https://reviews.llvm.org/D104950
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions