Permalink
Browse files

minor changes and additions

  • Loading branch information...
1 parent d81e53c commit 2a18b3ae22c4fe2e85d9207a2099120b5d2d1ac7 @duncantl committed Jul 8, 2013
Showing with 9 additions and 5 deletions.
  1. +5 −0 inst/TU/clang.R
  2. +4 −5 tests/store.R
View
5 inst/TU/clang.R
@@ -32,6 +32,11 @@ irbuilder.class = readCppClass(llvm$IRBuilder)
enums = getEnums(tu)
+
+
+cc = getEnums("~/llvm-devel/include/llvm/IR/CallingConv.h", args = "-xc++")
+cat(makeEnumClass(cc$ID, "CallingConv"), sep = "\n", file = "../../R/CallingConvEnum.R")
+
#klasses = getCppClasses(tu)
View
9 tests/store.R
@@ -1,18 +1,17 @@
library(Rllvm)
-InitializeNativeTarget()
+#InitializeNativeTarget()
mod = Module("tmp")
-ptrDouble = pointerType(DoubleType)
-fun = Function("foo", VoidType, module = mod)
+fun = Function("foo", VoidType, list(a = DoubleType), module = mod)
entry = Block(fun)
ir = IRBuilder(entry)
iv = ir$createLocalVariable(Int32Type, "i")
-one = createIntegerConstant("1")
+one = createIntegerConstant(1L)
ir$createStore( one, iv)
-ir$createReturnVoid()
+ir$createReturn()
showModule(mod, FALSE)

0 comments on commit 2a18b3a

Please sign in to comment.