Remove spurious consts. This fixes warnings with compilers that
authorDan Gohman <gohman@apple.com>
Fri, 14 Sep 2007 20:08:19 +0000 (20:08 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 14 Sep 2007 20:08:19 +0000 (20:08 +0000)
are strict about such things.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41956 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineInstr.h
lib/CodeGen/MachineInstr.cpp
lib/Support/APFloat.cpp
lib/System/Unix/Program.inc
utils/TableGen/CodeGenRegisters.h

index 8fe446f0e8bb307ef8577bfc13597def7ed7aa8d..4ba436b1fd97570e62aa3340be38634a9703d46f 100644 (file)
@@ -363,7 +363,7 @@ public:
 
   /// getOpcode - Returns the opcode of this MachineInstr.
   ///
-  const int getOpcode() const;
+  int getOpcode() const;
 
   /// Access to explicit operands of the instruction.
   ///
index 8a592318c51c5db53d4c63f61e10608fcacee7bb..d6aab291f909f1acab7fb6e44c0e845a1a16a399 100644 (file)
@@ -116,7 +116,7 @@ MachineInstr::~MachineInstr() {
 
 /// getOpcode - Returns the opcode of this MachineInstr.
 ///
-const int MachineInstr::getOpcode() const {
+int MachineInstr::getOpcode() const {
   return TID->Opcode;
 }
 
index 397ff6d164f58dadcc0238d5eed3eead0f2a497a..68c1fccc418c94ec4fe5a5b219ea17dca12411aa 100644 (file)
@@ -1629,7 +1629,7 @@ APFloat::convertF80LongDoubleAPFloatToAPInt() const {
 
 APInt
 APFloat::convertDoubleAPFloatToAPInt() const {
-  assert(semantics == (const llvm::fltSemantics* const)&IEEEdouble);
+  assert(semantics == (const llvm::fltSemantics*)&IEEEdouble);
   assert (partCount()==1);
 
   uint64_t myexponent, mysignificand;
@@ -1659,7 +1659,7 @@ APFloat::convertDoubleAPFloatToAPInt() const {
 
 APInt
 APFloat::convertFloatAPFloatToAPInt() const {
-  assert(semantics == (const llvm::fltSemantics* const)&IEEEsingle);
+  assert(semantics == (const llvm::fltSemantics*)&IEEEsingle);
   assert (partCount()==1);
   
   uint32_t myexponent, mysignificand;
index 896e8090e707d767676dec3ac36642ab0445f9ff..6517a96b09b853175b047743d341498658fff929 100644 (file)
@@ -196,9 +196,9 @@ Program::ExecuteAndWait(const Path& path,
       
       // Execute!
       if (envp != 0)
-        execve (path.c_str(), (char** const)args, (char**)envp);
+        execve (path.c_str(), (char**)args, (char**)envp);
       else
-        execv (path.c_str(), (char** const)args);
+        execv (path.c_str(), (char**)args);
       // If the execve() failed, we should exit and let the parent pick up
       // our non-zero exit status.
       exit (errno);
index 83c85b8f3a945c5664bbc30d9b90ad24715632f9..cee81e9092cb6866bc9072c0ed9083b51d26ef23 100644 (file)
@@ -45,7 +45,7 @@ namespace llvm {
     const std::vector<MVT::ValueType> &getValueTypes() const { return VTs; }
     unsigned getNumValueTypes() const { return VTs.size(); }
     
-    const MVT::ValueType getValueTypeNum(unsigned VTNum) const {
+    MVT::ValueType getValueTypeNum(unsigned VTNum) const {
       if (VTNum < VTs.size())
         return VTs[VTNum];
       assert(0 && "VTNum greater than number of ValueTypes in RegClass!");