aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2013-12-19 03:09:10 +0000
committerAaron Ballman <aaron@aaronballman.com>2013-12-19 03:09:10 +0000
commitc4327996caeda7f8bd3ae0ca8209261de53d5c64 (patch)
tree7bf5a673831fe07c2eb2e61d8f599189e778fa80 /clang/lib/CodeGen/CodeGenModule.cpp
parentdc265edb3b48379a769420775ff47d7ee1828775 (diff)
downloadllvm-c4327996caeda7f8bd3ae0ca8209261de53d5c64.zip
llvm-c4327996caeda7f8bd3ae0ca8209261de53d5c64.tar.gz
llvm-c4327996caeda7f8bd3ae0ca8209261de53d5c64.tar.bz2
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.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index e72abb1..718998b 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());
}