[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:
David Blaikie 2016-01-15 23:07:58 +00:00
parent cbf73beb6f
commit bb97dd4d89
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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);