mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Fixed method getReturnValue(): it should return NULL if the
callee does not return a value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3968 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ad9c978874
commit
f425884e27
@ -68,12 +68,12 @@ public:
|
||||
unsigned int getNumArgs() const { return argInfoVec.size(); }
|
||||
CallArgInfo& getArgInfo(unsigned int op) { assert(op < argInfoVec.size());
|
||||
return argInfoVec[op]; }
|
||||
const CallInst* getReturnValue() const { return callInstr; }
|
||||
const CallInst* getReturnValue() const;
|
||||
const Value* getIndirectFuncPtr() const { return funcPtr; }
|
||||
TmpInstruction* getReturnAddrReg() const { return retAddrReg; }
|
||||
bool isVarArgsFunc() const { return isVarArgs; }
|
||||
bool hasNoPrototype() const { return noPrototype; }
|
||||
|
||||
|
||||
// Annotation mechanism to annotate a MachineInstr with the descriptor.
|
||||
// This is not demand-driven because annotations can only be created
|
||||
// at restricted points during code generation.
|
||||
|
@ -30,3 +30,10 @@ CallArgsDescriptor::CallArgsDescriptor(const CallInst* _callInstr,
|
||||
for (unsigned int i=1; i < numArgs; ++i)
|
||||
argInfoVec.push_back(CallArgInfo(callInstr->getOperand(i)));
|
||||
}
|
||||
|
||||
|
||||
const CallInst*
|
||||
CallArgsDescriptor::getReturnValue() const
|
||||
{
|
||||
return (callInstr->getType() == Type::VoidTy? NULL : callInstr);
|
||||
}
|
||||
|
@ -68,12 +68,12 @@ public:
|
||||
unsigned int getNumArgs() const { return argInfoVec.size(); }
|
||||
CallArgInfo& getArgInfo(unsigned int op) { assert(op < argInfoVec.size());
|
||||
return argInfoVec[op]; }
|
||||
const CallInst* getReturnValue() const { return callInstr; }
|
||||
const CallInst* getReturnValue() const;
|
||||
const Value* getIndirectFuncPtr() const { return funcPtr; }
|
||||
TmpInstruction* getReturnAddrReg() const { return retAddrReg; }
|
||||
bool isVarArgsFunc() const { return isVarArgs; }
|
||||
bool hasNoPrototype() const { return noPrototype; }
|
||||
|
||||
|
||||
// Annotation mechanism to annotate a MachineInstr with the descriptor.
|
||||
// This is not demand-driven because annotations can only be created
|
||||
// at restricted points during code generation.
|
||||
|
Loading…
Reference in New Issue
Block a user