R600: Canonicalize access to function attributes, NFC
[oota-llvm.git] / lib / Target / R600 / AMDGPUMachineFunction.cpp
index 0f3f9e26528b8e70c57b21beed40874e896a591e..21c7da66323497e692f010275eba070564fb53e2 100644 (file)
@@ -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();