mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 05:06:07 +00:00

Currently this function would return nothing for functions or globals that haven't seen a definition yet. Make it return a forward declaration that will get RAUWed with the definition if one is seen at a later point. The strategy used to implement this is similar to what's done for types: the forward declarations are stored in a vector and post processed upon finilization to perform the required RAUWs. For now the only user of getDeclarationOrDefinition() is EmitUsingDecl(), thus this patch allows to emit correct imported declarations even in the absence of an actual definition of the imported entity. (Another user will be the debug info generation for argument default values that I need to resurect). Differential Revision: http://reviews.llvm.org/D6173 llvm-svn: 222220
Description
The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
Languages
LLVM
39.9%
C++
32.5%
C
13.5%
Assembly
9.4%
MLIR
1.4%
Other
2.8%