summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/OpenMPClause.cpp
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2018-04-18 15:30:08 +0000
committerKostya Kortchinsky <kostyak@google.com>2018-04-18 15:30:08 +0000
commiteaeb64a8146c57b5ed0f4175179c7eaad3585b23 (patch)
treec1da1f21f2b3b9da484f18f8c55704b450d6c4ab /clang/lib/AST/OpenMPClause.cpp
parent6adef098913cdec275fac4c0682dde11eb30e77f (diff)
downloadbcm5719-llvm-eaeb64a8146c57b5ed0f4175179c7eaad3585b23.tar.gz
bcm5719-llvm-eaeb64a8146c57b5ed0f4175179c7eaad3585b23.zip
[sanitizer] Minor refactor of ThreadDescriptorSize
Summary: While I was sifting through dead code findings, I stumbled on this function. First, for `__s390__` it always returned 0 for the 1st call, which doesn't seem right. 2nd call & beyond would return the correct value though. Then it duplicated the `atomic_store` multiple times, sometimes with a `if`, sometimes without. Finally it used a capitalized variable name starting with `k` which indicates a constant, and it is not. So: - rename the static global variable; - change the atomic functions to their relaxed version; - move the store to the end, and make sure we return `val` all the time. Reviewers: alekseyshl, eugenis, koriakin Reviewed By: alekseyshl Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D45725 llvm-svn: 330268
Diffstat (limited to 'clang/lib/AST/OpenMPClause.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud