[llvm] r186476 - Move string pointer from being a static class member to just a static global in the one file its needed in.

Craig Topper craig.topper at gmail.com
Tue Jul 16 17:31:35 PDT 2013


Author: ctopper
Date: Tue Jul 16 19:31:35 2013
New Revision: 186476

URL: http://llvm.org/viewvc/llvm-project?rev=186476&view=rev
Log:
Move string pointer from being a static class member to just a static global in the one file its needed in.

Modified:
    llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.cpp
    llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.h

Modified: llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.cpp?rev=186476&r1=186475&r2=186476&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.cpp Tue Jul 16 19:31:35 2013
@@ -2,10 +2,9 @@
 #include "AMDGPU.h"
 #include "llvm/IR/Attributes.h"
 #include "llvm/IR/Function.h"
+using namespace llvm;
 
-namespace llvm {
-
-const char *AMDGPUMachineFunction::ShaderTypeAttribute = "ShaderType";
+static const char *const ShaderTypeAttribute = "ShaderType";
 
 AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) :
     MachineFunctionInfo() {
@@ -21,5 +20,3 @@ AMDGPUMachineFunction::AMDGPUMachineFunc
       llvm_unreachable("Can't parse shader type!");
   }
 }
-
-}

Modified: llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.h?rev=186476&r1=186475&r2=186476&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.h (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.h Tue Jul 16 19:31:35 2013
@@ -18,8 +18,6 @@
 namespace llvm {
 
 class AMDGPUMachineFunction : public MachineFunctionInfo {
-private:
-  static const char *ShaderTypeAttribute;
 public:
   AMDGPUMachineFunction(const MachineFunction &MF);
   unsigned ShaderType;





More information about the llvm-commits mailing list