summaryrefslogtreecommitdiff
path: root/tools/llvm-readobj/MachODumper.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-01-16 12:06:38 +0000
committerHans Wennborg <hans@hanshq.net>2018-01-16 12:06:38 +0000
commit7f2e3d00cf4a72c69111765f87a467cd28026fb9 (patch)
tree98111b89b9190bff8f787cfd2a9f1b7ad0d74681 /tools/llvm-readobj/MachODumper.cpp
parentef854ab36638ba5b565f7734d22cbe3a510ae8b6 (diff)
Merging r322103:
------------------------------------------------------------------------ r322103 | tejohnson | 2018-01-09 10:32:53 -0800 (Tue, 09 Jan 2018) | 25 lines Fix crash when linking metadata with ODR type uniquing Summary: With DebugTypeODRUniquing enabled, during IR linking debug metadata in the destination module may be reached from the source module. This means that ConstantAsMetadata nodes (e.g. on DITemplateValueParameter) may contain a value the destination module. When trying to map such metadata nodes, we will attempt to map a GV already in the dest module. linkGlobalValueProto will end up with a source GV that is the same as the dest GV as well as the new GV. Trying to access the TypeMap for the source GV type, which is actually a dest GV type, hits an assertion since it appears that we have mapped into the source module (because the type is the value not a key into the map). Detect that we don't need to access the TypeMap in this case, since there is no need to create a bitcast from the new GV to the source GV type as they GV are the same. Fixes PR35722. Reviewers: mehdi_amini, pcc Subscribers: probinson, llvm-commits, eraman Differential Revision: https://reviews.llvm.org/D41624 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@322545 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-readobj/MachODumper.cpp')
0 files changed, 0 insertions, 0 deletions