summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2003-07-10 19:46:15 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2003-07-10 19:46:15 +0000
commit4d2faf630712f7a70d0d595f412a501a5e8cd3a8 (patch)
tree1edaea2b95d52ad58f364897f75dd53a3c1666a0
parent24d0410db074192fc8d9a60a168f6ec9d1b41edd (diff)
downloadllvm-4d2faf630712f7a70d0d595f412a501a5e8cd3a8.tar.gz
llvm-4d2faf630712f7a70d0d595f412a501a5e8cd3a8.tar.bz2
llvm-4d2faf630712f7a70d0d595f412a501a5e8cd3a8.tar.xz
Values stored in CallArgsDescriptor cannot be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7156 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/MachineInstrAnnot.h22
-rw-r--r--lib/CodeGen/MachineInstrAnnot.cpp4
-rw-r--r--lib/Target/SparcV9/MachineInstrAnnot.h22
3 files changed, 24 insertions, 24 deletions
diff --git a/include/llvm/CodeGen/MachineInstrAnnot.h b/include/llvm/CodeGen/MachineInstrAnnot.h
index e1902e77b3..9a3b99d540 100644
--- a/include/llvm/CodeGen/MachineInstrAnnot.h
+++ b/include/llvm/CodeGen/MachineInstrAnnot.h
@@ -20,14 +20,14 @@ class CallArgInfo {
static const unsigned char FPArgReg = 0x2;
static const unsigned char StackSlot = 0x4;
- const Value* argVal; // this argument
- int argCopyReg; // register used for second copy of arg. when
+ Value* argVal; // this argument
+ int argCopyReg; // register used for second copy of arg. when
// multiple copies must be passed in registers
unsigned char passingMethod; // flags recording passing methods
public:
// Constructors
- CallArgInfo(const Value* _argVal)
+ CallArgInfo(Value* _argVal)
: argVal(_argVal), argCopyReg(TargetRegInfo::getInvalidRegNum()),
passingMethod(0x0) {}
@@ -36,14 +36,14 @@ public:
passingMethod(obj.passingMethod) {}
// Accessor methods
- const Value* getArgVal() { return argVal; }
+ Value* getArgVal() { return argVal; }
int getArgCopy() { return argCopyReg; }
bool usesIntArgReg() { return (bool) (passingMethod & IntArgReg);}
bool usesFPArgReg() { return (bool) (passingMethod & FPArgReg); }
bool usesStackSlot() { return (bool) (passingMethod & StackSlot);}
// Modifier methods
- void replaceArgVal(const Value* newVal) { argVal = newVal; }
+ void replaceArgVal(Value* newVal) { argVal = newVal; }
void setUseIntArgReg() { passingMethod |= IntArgReg; }
void setUseFPArgReg() { passingMethod |= FPArgReg; }
void setUseStackSlot() { passingMethod |= StackSlot; }
@@ -54,14 +54,14 @@ public:
class CallArgsDescriptor {
std::vector<CallArgInfo> argInfoVec; // Descriptor for each argument
- const CallInst* callInstr; // The call instruction == result value
- const Value* funcPtr; // Pointer for indirect calls
+ CallInst* callInstr; // The call instruction == result value
+ Value* funcPtr; // Pointer for indirect calls
TmpInstruction* retAddrReg; // Tmp value for return address reg.
bool isVarArgs; // Is this a varargs call?
bool noPrototype; // Is this a call with no prototype?
public:
- CallArgsDescriptor(const CallInst* _callInstr, TmpInstruction* _retAddrReg,
+ CallArgsDescriptor(CallInst* _callInstr, TmpInstruction* _retAddrReg,
bool _isVarArgs, bool _noPrototype);
// Accessor methods to retrieve information about the call
@@ -69,9 +69,9 @@ public:
unsigned int getNumArgs() const { return argInfoVec.size(); }
CallArgInfo& getArgInfo(unsigned int op) { assert(op < argInfoVec.size());
return argInfoVec[op]; }
- const CallInst* getCallInst() const { return callInstr; }
- const CallInst* getReturnValue() const;
- const Value* getIndirectFuncPtr() const { return funcPtr; }
+ CallInst* getCallInst() const { return callInstr; }
+ CallInst* getReturnValue() const;
+ Value* getIndirectFuncPtr() const { return funcPtr; }
TmpInstruction* getReturnAddrReg() const { return retAddrReg; }
bool isVarArgsFunc() const { return isVarArgs; }
bool hasNoPrototype() const { return noPrototype; }
diff --git a/lib/CodeGen/MachineInstrAnnot.cpp b/lib/CodeGen/MachineInstrAnnot.cpp
index 7f93753ccd..419e10ecd3 100644
--- a/lib/CodeGen/MachineInstrAnnot.cpp
+++ b/lib/CodeGen/MachineInstrAnnot.cpp
@@ -12,7 +12,7 @@
#include "llvm/Type.h"
-CallArgsDescriptor::CallArgsDescriptor(const CallInst* _callInstr,
+CallArgsDescriptor::CallArgsDescriptor(CallInst* _callInstr,
TmpInstruction* _retAddrReg,
bool _isVarArgs, bool _noPrototype)
: callInstr(_callInstr),
@@ -35,7 +35,7 @@ CallArgsDescriptor::CallArgsDescriptor(const CallInst* _callInstr,
}
-const CallInst*
+CallInst*
CallArgsDescriptor::getReturnValue() const
{
return (callInstr->getType() == Type::VoidTy? NULL : callInstr);
diff --git a/lib/Target/SparcV9/MachineInstrAnnot.h b/lib/Target/SparcV9/MachineInstrAnnot.h
index e1902e77b3..9a3b99d540 100644
--- a/lib/Target/SparcV9/MachineInstrAnnot.h
+++ b/lib/Target/SparcV9/MachineInstrAnnot.h
@@ -20,14 +20,14 @@ class CallArgInfo {
static const unsigned char FPArgReg = 0x2;
static const unsigned char StackSlot = 0x4;
- const Value* argVal; // this argument
- int argCopyReg; // register used for second copy of arg. when
+ Value* argVal; // this argument
+ int argCopyReg; // register used for second copy of arg. when
// multiple copies must be passed in registers
unsigned char passingMethod; // flags recording passing methods
public:
// Constructors
- CallArgInfo(const Value* _argVal)
+ CallArgInfo(Value* _argVal)
: argVal(_argVal), argCopyReg(TargetRegInfo::getInvalidRegNum()),
passingMethod(0x0) {}
@@ -36,14 +36,14 @@ public:
passingMethod(obj.passingMethod) {}
// Accessor methods
- const Value* getArgVal() { return argVal; }
+ Value* getArgVal() { return argVal; }
int getArgCopy() { return argCopyReg; }
bool usesIntArgReg() { return (bool) (passingMethod & IntArgReg);}
bool usesFPArgReg() { return (bool) (passingMethod & FPArgReg); }
bool usesStackSlot() { return (bool) (passingMethod & StackSlot);}
// Modifier methods
- void replaceArgVal(const Value* newVal) { argVal = newVal; }
+ void replaceArgVal(Value* newVal) { argVal = newVal; }
void setUseIntArgReg() { passingMethod |= IntArgReg; }
void setUseFPArgReg() { passingMethod |= FPArgReg; }
void setUseStackSlot() { passingMethod |= StackSlot; }
@@ -54,14 +54,14 @@ public:
class CallArgsDescriptor {
std::vector<CallArgInfo> argInfoVec; // Descriptor for each argument
- const CallInst* callInstr; // The call instruction == result value
- const Value* funcPtr; // Pointer for indirect calls
+ CallInst* callInstr; // The call instruction == result value
+ Value* funcPtr; // Pointer for indirect calls
TmpInstruction* retAddrReg; // Tmp value for return address reg.
bool isVarArgs; // Is this a varargs call?
bool noPrototype; // Is this a call with no prototype?
public:
- CallArgsDescriptor(const CallInst* _callInstr, TmpInstruction* _retAddrReg,
+ CallArgsDescriptor(CallInst* _callInstr, TmpInstruction* _retAddrReg,
bool _isVarArgs, bool _noPrototype);
// Accessor methods to retrieve information about the call
@@ -69,9 +69,9 @@ public:
unsigned int getNumArgs() const { return argInfoVec.size(); }
CallArgInfo& getArgInfo(unsigned int op) { assert(op < argInfoVec.size());
return argInfoVec[op]; }
- const CallInst* getCallInst() const { return callInstr; }
- const CallInst* getReturnValue() const;
- const Value* getIndirectFuncPtr() const { return funcPtr; }
+ CallInst* getCallInst() const { return callInstr; }
+ CallInst* getReturnValue() const;
+ Value* getIndirectFuncPtr() const { return funcPtr; }
TmpInstruction* getReturnAddrReg() const { return retAddrReg; }
bool isVarArgsFunc() const { return isVarArgs; }
bool hasNoPrototype() const { return noPrototype; }