X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FR600%2FAMDGPUMachineFunction.cpp;h=90af80113eceb1368196cc4307611ef395a36479;hb=12af22e8cc217827cf4f118b0f5e4ebbda9925ae;hp=9a1e3447e7e5d3a11c6d96822424364c1a277f86;hpb=e3d4cbc7d25061441adafa47450a31571c87bf85;p=oota-llvm.git diff --git a/lib/Target/R600/AMDGPUMachineFunction.cpp b/lib/Target/R600/AMDGPUMachineFunction.cpp index 9a1e3447e7e..90af80113ec 100644 --- a/lib/Target/R600/AMDGPUMachineFunction.cpp +++ b/lib/Target/R600/AMDGPUMachineFunction.cpp @@ -2,15 +2,17 @@ #include "AMDGPU.h" #include "llvm/IR/Attributes.h" #include "llvm/IR/Function.h" +using namespace llvm; -namespace llvm { +static const char *const ShaderTypeAttribute = "ShaderType"; -const char *AMDGPUMachineFunction::ShaderTypeAttribute = "ShaderType"; +// Pin the vtable to this file. +void AMDGPUMachineFunction::anchor() {} AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) : - MachineFunctionInfo() { - ShaderType = ShaderType::COMPUTE; - LDSSize = 0; + MachineFunctionInfo(), + ShaderType(ShaderType::COMPUTE), + LDSSize(0) { AttributeSet Set = MF.getFunction()->getAttributes(); Attribute A = Set.getAttribute(AttributeSet::FunctionIndex, ShaderTypeAttribute); @@ -21,5 +23,3 @@ AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) : llvm_unreachable("Can't parse shader type!"); } } - -}