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
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user