Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mensagem de erro mais amigavel para tratar de chamadas a

funcoes nao definidas.
  • Loading branch information...
commit de240f34ff1098e83d1885d5589d758790e25f99 1 parent ad80d12
Andrei Formiga authored
View
2  stage0/llvm_codegen.ml
@@ -64,7 +64,7 @@ let format_str = define_global "format_str" (const_stringz llcontext "%d") the_m
(** Obtem uma funcao ja compilada para bitcode *)
let get_bc_function fname = match lookup_function fname the_module with
Some f -> f
- | None -> failwith "Funcao nao encontrada"
+ | None -> failwith ("Funcao nao encontrada: " ^ fname)
(** Traduz uma expressao *)
View
2  stage1/llvm_codegen.ml
@@ -64,7 +64,7 @@ let format_str = define_global "format_str" (const_stringz llcontext "%d") the_m
(** Obtem uma funcao ja compilada para bitcode *)
let get_bc_function fname = match lookup_function fname the_module with
Some f -> f
- | None -> failwith "Funcao nao encontrada"
+ | None -> failwith ("Funcao nao encontrada: " ^ fname)
let find_variable symtbl name =
View
2  stage2/llvm_codegen.ml
@@ -42,7 +42,7 @@ let one = const_int int_type 1
(** Obtem uma funcao ja compilada para bitcode *)
let get_bc_function fname = match lookup_function fname the_module with
Some f -> f
- | None -> failwith "Funcao nao encontrada"
+ | None -> failwith ("Funcao nao encontrada: " ^ fname)
(** Adiciona parametros na tabela de simbolos e
associa-os a nomes no codigo LLVM *)
Please sign in to comment.
Something went wrong with that request. Please try again.