Permalink
Browse files

Bind and use new dumping functions

  • Loading branch information...
1 parent d8f5c72 commit 36389e4b1f1f2a853e018d8dc600c8ba36a29b89 @bacek bacek committed with Reini Urban Apr 25, 2011
@@ -998,11 +998,19 @@ typedef enum {
GetBitcodeModule => "vPpB",
####### Core.h
LLVMCreateMemoryBufferWithContentsOfFile => "vPB",
+
);
for %funcs.kv -> $name, $signature {
%F{$name} := pir::dlfunc__ppss($lib, "LLVM" ~ $name, $signature);
}
+
+####### Parrot added functions
+ %F<DumpModuleToString> := pir::dlfunc__ppss(undef, "Parrot_LLVMDumpModuleToString", "SJp")
+ // die("Ooops");
+ %F<DumpValueToString> := pir::dlfunc__ppss(undef, "Parrot_LLVMDumpValueToString", "SJp");
+ %F<DumpTypeToString> := pir::dlfunc__ppss(undef, "Parrot_LLVMDumpTypeToString", "SJp");
+
}
}
@@ -19,7 +19,7 @@ class LLVM::Module is LLVM::Opaque {
}
method dump() {
- LLVM::call("DumpModule", self);
+ LLVM::call("DumpModuleToString", self);
}
method add_function ($name, $return, *@args, :$va_args?) {
@@ -46,6 +46,10 @@ class LLVM::Type is LLVM::Value {
);
}
+ method dump() {
+ LLVM::call("DumpTypeToString", self);
+ }
+
# Shortcut for i8*
sub cstring() { pointer(int8()); }
@@ -15,7 +15,7 @@ class LLVM::Value is LLVM::Opaque {
}
method dump() {
- LLVM::call("DumpValue", self);
+ LLVM::call("DumpValueToString", self);
}
INIT {

0 comments on commit 36389e4

Please sign in to comment.