]> granicus.if.org Git - llvm/commit
Silence ubsan after r367926.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 6 Aug 2019 00:21:30 +0000 (00:21 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 6 Aug 2019 00:21:30 +0000 (00:21 +0000)
commit2feb286e0756d56cfbf680503b483b8f922c2c1b
tree8093ed3e6de7016a41ce24fd841f2f70f044f9ff
parent8205853a0c1846420b319bf732d99f992b097ee0
Silence ubsan after r367926.

Fixes e.g.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/14273

We can't left shift here because left shifting of a negative number is UB.
The same doesn't apply to unsigned arithmetic, but switching to unsigned
doesn't appear to stop ubsan from complaining, so we need to mask out the
high bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367959 91177308-0d34-0410-b5e6-96231b3b80d8
lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp