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 | c4327996caeda7f8bd3ae0ca8209261de53d5c64 (patch) | |
| tree | 7bf5a673831fe07c2eb2e61d8f599189e778fa80 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | dc265edb3b48379a769420775ff47d7ee1828775 (diff) | |
Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value.
No functional changes intended.
llvm-svn: 197652
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index e72abb10a452..718998b7ab8d 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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()); } |
