From c4327996caeda7f8bd3ae0ca8209261de53d5c64 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 19 Dec 2013 03:09:10 +0000 Subject: 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 --- clang/lib/CodeGen/CodeGenModule.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') 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()) { - const TLSModelAttr *Attr = D.getAttr(); + if (const TLSModelAttr *Attr = D.getAttr()) { TLM = GetLLVMTLSModel(Attr->getModel()); } -- cgit v1.1