mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-24 21:05:23 +00:00
[opaque pointer types] Remove an unnecessary extra explicit value type in Function
Now that this is up in GlobalValue, just use the value there. llvm-svn: 257949
This commit is contained in:
parent
cbf73beb6f
commit
bb97dd4d89
@ -56,7 +56,6 @@ private:
|
||||
mutable ArgumentListType ArgumentList; ///< The formal arguments
|
||||
ValueSymbolTable *SymTab; ///< Symbol table of args/instructions
|
||||
AttributeSet AttributeSets; ///< Parameter attributes
|
||||
FunctionType *Ty;
|
||||
|
||||
/*
|
||||
* Value::SubclassData
|
||||
|
@ -224,7 +224,9 @@ LLVMContext &Function::getContext() const {
|
||||
return getType()->getContext();
|
||||
}
|
||||
|
||||
FunctionType *Function::getFunctionType() const { return Ty; }
|
||||
FunctionType *Function::getFunctionType() const {
|
||||
return cast<FunctionType>(getValueType());
|
||||
}
|
||||
|
||||
bool Function::isVarArg() const {
|
||||
return getFunctionType()->isVarArg();
|
||||
@ -249,8 +251,7 @@ void Function::eraseFromParent() {
|
||||
Function::Function(FunctionType *Ty, LinkageTypes Linkage, const Twine &name,
|
||||
Module *ParentModule)
|
||||
: GlobalObject(Ty, Value::FunctionVal,
|
||||
OperandTraits<Function>::op_begin(this), 0, Linkage, name),
|
||||
Ty(Ty) {
|
||||
OperandTraits<Function>::op_begin(this), 0, Linkage, name) {
|
||||
assert(FunctionType::isValidReturnType(getReturnType()) &&
|
||||
"invalid return type");
|
||||
setGlobalObjectSubClassData(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user