public class RallocTranslator implements CallTranslator {
@Override
public boolean accept(GimpleCall call) {
GimpleExpr functionExpr = call.getFunction();
if(!(functionExpr instanceof GimpleAddressOf)) {
return false;
}
GimpleExpr value = ((GimpleAddressOf) functionExpr).getValue();
if (!(value instanceof GimpleFunctionRef)) {
return false;
}
return ((GimpleFunctionRef) value).getName().equals("R_alloc");
}