diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-14 02:45:45 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-14 02:45:45 +0000 |
commit | 8480c87ce6a7ca543ece1d583a598294e049498c (patch) | |
tree | d88aff71d3d04ef1324b011f2d6148ee59c9e8a7 /llvm/lib | |
parent | 2e7531435236b836395ace040a83ff501290e764 (diff) | |
download | llvm-8480c87ce6a7ca543ece1d583a598294e049498c.zip llvm-8480c87ce6a7ca543ece1d583a598294e049498c.tar.gz llvm-8480c87ce6a7ca543ece1d583a598294e049498c.tar.bz2 |
R600: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.
getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
=> getFnAttribute(Kind)
getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
=> hasFnAttribute(Kind)
llvm-svn: 229222
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/R600/AMDGPUMachineFunction.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/R600/SITypeRewriter.cpp | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUMachineFunction.cpp b/llvm/lib/Target/R600/AMDGPUMachineFunction.cpp index 0f3f9e2..21c7da6 100644 --- a/llvm/lib/Target/R600/AMDGPUMachineFunction.cpp +++ b/llvm/lib/Target/R600/AMDGPUMachineFunction.cpp @@ -15,9 +15,7 @@ AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) : LDSSize(0), ScratchSize(0), IsKernel(true) { - AttributeSet Set = MF.getFunction()->getAttributes(); - Attribute A = Set.getAttribute(AttributeSet::FunctionIndex, - ShaderTypeAttribute); + Attribute A = MF.getFunction()->getFnAttribute(ShaderTypeAttribute); if (A.isStringAttribute()) { StringRef Str = A.getValueAsString(); diff --git a/llvm/lib/Target/R600/SITypeRewriter.cpp b/llvm/lib/Target/R600/SITypeRewriter.cpp index 9318dc1..27bbf4f 100644 --- a/llvm/lib/Target/R600/SITypeRewriter.cpp +++ b/llvm/lib/Target/R600/SITypeRewriter.cpp @@ -61,8 +61,7 @@ bool SITypeRewriter::doInitialization(Module &M) { } bool SITypeRewriter::runOnFunction(Function &F) { - AttributeSet Set = F.getAttributes(); - Attribute A = Set.getAttribute(AttributeSet::FunctionIndex, "ShaderType"); + Attribute A = F.getFnAttribute("ShaderType"); unsigned ShaderType = ShaderType::COMPUTE; if (A.isStringAttribute()) { |