public class FunctionType extends Type implements Cloneable
relaxedEqSem
Constructor and Description |
---|
FunctionType(String name,
SizeThunk size,
Type returnType,
int cvAttributes) |
FunctionType(String name,
SizeThunk size,
Type returnType,
int cvAttributes,
ASTLocusTag astLocus) |
Modifier and Type | Method and Description |
---|---|
void |
addArgument(Type argumentType,
String argumentName)
Add an argument's name and type.
|
FunctionType |
asFunction()
Casts this to a FunctionType or returns null if not a FunctionType.
|
protected boolean |
equalSemanticsImpl(Type arg) |
protected boolean |
equalsImpl(Type arg) |
String |
getArgumentName(int i)
Returns the name of the ith argument.
|
Type |
getArgumentType(int i)
Returns the type of the ith argument.
|
int |
getNumArguments() |
Type |
getReturnType()
Returns the return type of this function.
|
protected int |
hashCodeImpl() |
protected int |
hashCodeSemanticsImpl() |
void |
setArgumentName(int i,
String name) |
String |
toString()
Returns a string representation of this type.
|
String |
toString(String functionName,
boolean emitNativeTag) |
void |
visit(TypeVisitor arg)
Traverse this
Type and all of its component types; for
example, the return type and argument types of a FunctionType. |
arrayDimension, asArray, asBit, asCompound, asDouble, asEnum, asFloat, asInt, asPointer, asVoid, clearCache, clone, equals, equalSemantics, getASTLocusTag, getBaseElementType, getCName, getCName, getCVAttributes, getCVAttributesString, getDebugString, getName, getName, getSize, getSize, getTargetType, hashCode, hashCodeSemantics, isAnon, isArray, isBaseTypeConst, isBit, isCompound, isConst, isDouble, isEnum, isFloat, isFunction, isFunctionPointer, isInt, isPointer, isPrimitive, isTypedef, isVoid, isVolatile, newCVVariant, pointerDepth, setTypedefName
public FunctionType(String name, SizeThunk size, Type returnType, int cvAttributes, ASTLocusTag astLocus)
protected int hashCodeImpl()
hashCodeImpl
in class Type
protected boolean equalsImpl(Type arg)
equalsImpl
in class Type
protected int hashCodeSemanticsImpl()
hashCodeSemanticsImpl
in class Type
protected boolean equalSemanticsImpl(Type arg)
equalSemanticsImpl
in class Type
public FunctionType asFunction()
Type
asFunction
in class Type
public Type getReturnType()
public int getNumArguments()
public String getArgumentName(int i)
public Type getArgumentType(int i)
public void addArgument(Type argumentType, String argumentName)
public void setArgumentName(int i, String name)
public String toString()
Type
public void visit(TypeVisitor arg)
Type
Type
and all of its component types; for
example, the return type and argument types of a FunctionType.