[SystemZ] Clean up warning
[oota-llvm.git] / lib / Target / R600 / AMDGPUMachineFunction.cpp
index d4531012c84da1b2d88109e9814240e4d52ee729..21c7da66323497e692f010275eba070564fb53e2 100644 (file)
@@ -6,16 +6,16 @@ using namespace llvm;
 
 static const char *const ShaderTypeAttribute = "ShaderType";
 
-// pin vtable to this file
+// Pin the vtable to this file.
 void AMDGPUMachineFunction::anchor() {}
 
 AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) :
-    MachineFunctionInfo() {
-  ShaderType = ShaderType::COMPUTE;
-  LDSSize = 0;
-  AttributeSet Set = MF.getFunction()->getAttributes();
-  Attribute A = Set.getAttribute(AttributeSet::FunctionIndex,
-                                 ShaderTypeAttribute);
+  MachineFunctionInfo(),
+  ShaderType(ShaderType::COMPUTE),
+  LDSSize(0),
+  ScratchSize(0),
+  IsKernel(true) {
+  Attribute A = MF.getFunction()->getFnAttribute(ShaderTypeAttribute);
 
   if (A.isStringAttribute()) {
     StringRef Str = A.getValueAsString();