コード例 #1
0
ファイル: print.cpp プロジェクト: csll/llvm
void 
print(Printer& p, Return_instr const* i)
{
  print(p, "ret ");
  print(p, i->type());
  print_space(p);
  if (!is_void_type(i->type()))
    print(p, i->value());
}
コード例 #2
0
char is_sound_type(type_t* t, decl_context_t decl_context)
{
    ERROR_CONDITION(t == NULL, "Invalid NULL here", 0);

    if (is_array_type(t))
    {
        type_t* element_type = array_type_get_element_type(t);
        if (is_void_type(element_type)
                || is_lvalue_reference_type(element_type)
                || is_function_type(element_type))
        {
            DEBUG_CODE()
            {
                fprintf(stderr, "TYPEORDER: Deduced type is not sound because it is an array of void/references/functions\n");
            }
            return 0;
        }
 bool Type::is_void() const
 {
     return is_void_type(_type_info);
 }