diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-12-19 03:09:10 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-12-19 03:09:10 +0000 |
commit | e5e1f3542355ee4fe00de867ddea7d15f872bb1d (patch) | |
tree | 6556c6b43eb7061cbbd70a8bcee98aa4fce417d3 /lib/CodeGen/CodeGenModule.cpp | |
parent | 73b8843fa2827a9b3c0dd1995272e72b3b97a146 (diff) | |
download | clang-e5e1f3542355ee4fe00de867ddea7d15f872bb1d.tar.gz clang-e5e1f3542355ee4fe00de867ddea7d15f872bb1d.tar.bz2 clang-e5e1f3542355ee4fe00de867ddea7d15f872bb1d.tar.xz |
Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value.
No functional changes intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197652 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index e72abb10a4..718998b7ab 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -409,8 +409,7 @@ void CodeGenModule::setTLSMode(llvm::GlobalVariable *GV, TLM = GetLLVMTLSModel(CodeGenOpts.getDefaultTLSModel()); // Override the TLS model if it is explicitly specified. - if (D.hasAttr<TLSModelAttr>()) { - const TLSModelAttr *Attr = D.getAttr<TLSModelAttr>(); + if (const TLSModelAttr *Attr = D.getAttr<TLSModelAttr>()) { TLM = GetLLVMTLSModel(Attr->getModel()); } |