summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-04-13 20:47:55 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-04-13 20:47:55 +0000
commit2c08051cc58d4b9b3ce2b5312e7f3b93dd431ffa (patch)
tree77699f2a404a932e16c7c535554564a3d2c1dc74 /llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp
parent4bb54d51c86e4a3aaf7bf502e7a76eaef4435e23 (diff)
downloadbcm5719-llvm-2c08051cc58d4b9b3ce2b5312e7f3b93dd431ffa.tar.gz
bcm5719-llvm-2c08051cc58d4b9b3ce2b5312e7f3b93dd431ffa.zip
MC: check machine magic when applying offset adjustments
The values for the relocation type can (and do) overlap across various architectures. When performing an adjustment of the emitted relocation in the final object file, check that the file magic matches the target for which the relocation type is valid (e.g. a I386 relocation is only applied to an X86 object file, and an AMD64 relocation is only applied to an X86_64 object file). This was noticed while adding support for ARM WinCOFF object file emission. A test case for this is not really possible as the values for REL32 do not overlap on I386 and AMD64, which is why this was never noticed in practice. The ARM WinCOFF emission is not yet ready to merge into the tree. llvm-svn: 206138
Diffstat (limited to 'llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud