aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.h
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2018-01-09 18:32:53 +0000
committerTeresa Johnson <tejohnson@google.com>2018-01-09 18:32:53 +0000
commitba22da0da3f012d7864bafb2de83572ec4362865 (patch)
tree532cda9df74f14c7630482b2aaa17c74ce819b29 /llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.h
parent975eacada575198728353ce53e3d30b9b6404b07 (diff)
downloadllvm-ba22da0da3f012d7864bafb2de83572ec4362865.zip
llvm-ba22da0da3f012d7864bafb2de83572ec4362865.tar.gz
llvm-ba22da0da3f012d7864bafb2de83572ec4362865.tar.bz2
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 llvm-svn: 322103
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.h')
0 files changed, 0 insertions, 0 deletions