aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorYaxun (Sam) Liu <yaxun.liu@amd.com>2021-09-22 23:45:27 -0400
committerYaxun (Sam) Liu <yaxun.liu@amd.com>2021-09-27 13:25:46 -0400
commitc4afb5f81b62b903e4af8a92235e1b901e184040 (patch)
treeaabb433b3ca3b40b4d3b25d729645100d03ad946 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent6dd5b1e33e041c51549460fbd3364dc7242d60ce (diff)
downloadllvm-c4afb5f81b62b903e4af8a92235e1b901e184040.zip
llvm-c4afb5f81b62b903e4af8a92235e1b901e184040.tar.gz
llvm-c4afb5f81b62b903e4af8a92235e1b901e184040.tar.bz2
[HIP] Fix linking of asanrt.bc
HIP currently uses -mlink-builtin-bitcode to link all bitcode libraries, which changes the linkage of functions to be internal once they are linked in. This works for common bitcode libraries since these functions are not intended to be exposed for external callers. However, the functions in the sanitizer bitcode library is intended to be called by instructions generated by the sanitizer pass. If their linkage is changed to internal, their parameters may be altered by optimizations before the sanitizer pass, which renders them unusable by the sanitizer pass. To fix this issue, HIP toolchain links the sanitizer bitcode library with -mlink-bitcode-file, which does not change the linkage. A struct BitCodeLibraryInfo is introduced in ToolChain as a generic approach to pass the bitcode library information between ToolChain and Tool. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D110304
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions