Hosting a call to getAttr so that we don't call it multiple times for the same attribute. Also removes a hasAttr that's not required. No functional changes intended.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197675 91177308-0d34-0410-b5e6-96231b3b80d8
Switched code from using hasAttr followed by getAttr to simply call getAttr directly.

No functional changes intended.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@197676 91177308-0d34-0410-b5e6-96231b3b80d8
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: http://llvm.org/svn/llvm-project/cfe/trunk@197678 91177308-0d34-0410-b5e6-96231b3b80d8