Permalink
Browse files

[llvm] Add stubs for handling Module.global

  • Loading branch information...
1 parent 4b30343 commit e8b60ade87a1b02e438cf63197e311d0c5528aa7 @bacek bacek committed with Reini Urban Apr 4, 2011
Showing with 22 additions and 0 deletions.
  1. +22 −0 runtime/parrot/library/LLVM/Module.pm
@@ -86,6 +86,28 @@ class LLVM::Module is LLVM::Opaque {
LLVM::call("WriteBitcodeToFile", self, $path);
}
+
+#/* Operations on global variables */
+# AddGlobal => "pppt",
+# AddGlobalInAddressSpace => "pppti",
+# GetNamedGlobal => "ppt",
+# GetFirstGlobal => "pp",
+# GetLastGlobal => "pp",
+# GetNextGlobal => "pp",
+# GetPreviousGlobal => "pp",
+# DeleteGlobal => "vp",
+# GetInitializer => "vp",
+# SetInitializer => "vpp",
+# IsThreadLocal => "ip",
+# SetThreadLocal => "vpi",
+# IsGlobalConstant => "ip",
+# SetGlobalConstant => "vpi",
+ multi method get_global(:$name) {
+ LLVM::Value.create(
+ LLVM::call("GetNamedGlobal", self, $name)
+ )
+ }
+
};
# vim: ft=perl6

0 comments on commit e8b60ad

Please sign in to comment.