Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bind and use new dumping functions

  • Loading branch information...
commit 7ad3085c0bc4c1de805fd7fa343101b671b1ad79 1 parent 2973176
@bacek bacek authored
View
8 runtime/parrot/library/LLVM.pm
@@ -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");
+
}
}
View
2  runtime/parrot/library/LLVM/Module.pm
@@ -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?) {
View
4 runtime/parrot/library/LLVM/Type.pm
@@ -46,6 +46,10 @@ class LLVM::Type is LLVM::Value {
);
}
+ method dump() {
+ LLVM::call("DumpTypeToString", self);
+ }
+
# Shortcut for i8*
sub cstring() { pointer(int8()); }
View
2  runtime/parrot/library/LLVM/Value.pm
@@ -15,7 +15,7 @@ class LLVM::Value is LLVM::Opaque {
}
method dump() {
- LLVM::call("DumpValue", self);
+ LLVM::call("DumpValueToString", self);
}
INIT {
Please sign in to comment.
Something went wrong with that request. Please try again.