Displaying 20 results from an estimated 700 matches similar to: "[LLVMdev] inserting a print statement into IR"
2011 Apr 05
0
[LLVMdev] inserting a print statement into IR
On 4/4/2011 6:26 PM, George Baah wrote:
> Hi Everyone,
> I am trying to construct the print statement : printf("value:%d\n",
> value);
> This is my llvm code. It is seg faulting at
> builder.CreateGlobalStringPtr(str,"").
This might be easier to debug with a stack trace. Use a debugger to see
the call stack when the segfault occurs. Also try to isolate
2011 Apr 01
3
[LLVMdev] insert printf into IR
Hi All,
I am trying to insert printf ("%d", v), where v is an integer param, into
the IR.
I am doing something wrong because I keep getting segfaults.
Below is my code. Thanks.
vector<const Type *> params;
params.push_back(Type::getInt8PtrTy(M.getContext()));
params.push_back(Type::getInt32Ty(M.getContext()));
FunctionType *fType =
2011 Apr 05
2
[LLVMdev] inserting a print statement into IR
This is the seg fault I am getting.
dyld: lazy symbol binding failed: Symbol not found:
__ZN4llvm13IRBuilderBase18CreateGlobalStringEPKcRKNS_5TwineE
Referenced from:
/Users/georgebaah/llvm_dir/llvm-2.8/Debug+Asserts/lib/LLVMArrayBoundsCheck.dylib
Expected in: flat namespace
dyld: Symbol not found:
__ZN4llvm13IRBuilderBase18CreateGlobalStringEPKcRKNS_5TwineE
Referenced from:
2011 Apr 05
0
[LLVMdev] inserting a print statement into IR
Hi George,
> This is the seg fault I am getting.
>
> dyld: lazy symbol binding failed: Symbol not found:
> __ZN4llvm13IRBuilderBase18CreateGlobalStringEPKcRKNS_5TwineE
> Referenced from:
> /Users/georgebaah/llvm_dir/llvm-2.8/Debug+Asserts/lib/LLVMArrayBoundsCheck.dylib
> Expected in: flat namespace
>
> dyld: Symbol not found:
2015 Aug 05
2
[BUG] Incorrect ASCII escape characters on Mac
On Wed, 2015-08-05 at 10:02 -0400, Ramkumar Ramachandra wrote:
>
> - at 5 = internal global [10 x i8] c"\22\D0\12\F4!\00\15\F9\EC\E1"
> - at 6 = internal global [10 x i8] c"\D0\19\FB+\FD\F8#\03\E2\11"
> + at 5 = internal global [10 x i8] c"\22Ð\12ô!\00\15ùìá"
> + at 6 = internal global [10 x i8] c"Ð\19û+ýø#\03â\11"
>
> The diff
2015 Nov 24
2
How to create a sprintf call in IR
Hi,
I created a global char array, char buffer[1024]. I want to call a function
to append the string information to the buffer repeatedly. For example, I
need to implement the following code, where length, a, b, c, are global
variables.
int length = 0;
length += sprintf(buffer+length, "str%d", a);
length += sprintf(buffer+length, "str%c", b);
length += sprintf(buffer+length,
2012 Jan 22
2
[LLVMdev] CreateGlobalStringPtr giving linker errors
Hi,
I am trying to use some LLVM API in my C++ code, and I end up getting
linker errors. I am working on Apple MacOSX Lion. Using g++ for the
compile. It is the CreateGlobalStringPtr which is throwing the error. This
is LLVM 3.0.
Here's the codeI am trying to use some LLVM API in my C++ code, and I end
up getting linker errors. I am working on Apple MacOSX Lion. Using g++ for
the compile. It
2012 Jan 22
0
[LLVMdev] CreateGlobalStringPtr giving linker errors
Probably your g++ compiles x86_64 binary by default, but i686 dylib is supplied?
Try:
g++ -m32 e.cpp /Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/libllvmgcc.dylib
- D.
2012/1/22 Arpan Sen <arpansen at gmail.com>:
> Hi,
>
> I am trying to use some LLVM API in my C++ code, and I end up getting linker
> errors. I am
2012 Jan 23
1
[LLVMdev] Code crashing in CreateGlobalStringPtr, passes when I add code for main routine + entry
Hi All,
The following crashes in CreateGlobalStringPtr:
#include "llvm/Support/DataTypes.h"
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/Constants.h"
#include "llvm/Function.h"
#include "llvm/BasicBlock.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include
2004 Oct 29
1
[rmetasim] Need help deciphering this error msg... targeted to those who use rmetasim...
Hello,
I am trying to do some simulation using the rmetasim
package and I've run to this problem.
--beginning of error msg--
Error in "[<-"(`*tmp*`, slice[l, ], slice[l, ], value
= c(0.200000002980232, :
number of items to replace is not a multiple
of replacement length
--end of error msg--
Here is the script I used.
--script starts here--
## load 'rmetasim'
2011 Apr 01
0
[LLVMdev] insert printf into IR
Hi George,
> I am trying to insert printf ("%d", v), where v is an integer param, into the IR.
> I am doing something wrong because I keep getting segfaults.
if you are doing development with LLVM then you should build LLVM with
assertions enabled. That way you get understandable failures rather
than obscure segmentation faults.
> Function *f = cast<Function>(temp);
2015 Mar 10
4
[LLVMdev] noob IR builder question
I am trying to get a handle on IR builder, at least some basics. I ran through a tutorial here: Create a working compiler with the LLVM framework, Part 1 <http://www.ibm.com/developerworks/library/os-createcompilerllvm1/>, and it worked well enough. I have some simple code that creates a hello world IR. I am trying to now bring in some concepts from the Kaleidoscope tutorial, namely
2012 Aug 09
1
Factor moderators in metafor
I'm puzzled by the behaviour of factors in rma models, see example and
comments below. I'm sure there's a simple explanation but can't see it...
Thanks for any input
John Hodgson
------------------------------------- code/selected output -----------------
library(metafor)
## Set up data (from Lenters et al A Meta-analysis of Asbestos and Lung
Cancer...
##
2012 May 03
5
[PATCH/RFC 0/6] New mux client request to list open tcp forwardings.
These patches implement a new mux client request to list the currently opened
TCP forwardings. It also removes some todos regarding keeping the list
of forwardings in the options up-to-date.
Bert Wesarg (6):
attach the forwarding type to struct Forward
merge local and remote forward lists
generate unique ids for forwardings to be used for identification
remove closed forwardings from
2011 Dec 04
2
a weird question about gdata:::
Dear R People:
If I put in:
> findPerl
Error: object 'findPerl' not found
But if I use:
> gdata:::findPerl
function (perl, verbose = "FALSE")
{
errorMsg <- "perl executable not found. Use perl= argument to
specify the correct path."
if (missing(perl)) {
perl = "perl"
}
perl = Sys.which(perl)
if (perl == "" ||
2015 Sep 07
5
[PATCH 0/4 v3] builder: support for Simple Streams metadata
Hi,
this series adds a basic support for Simple Streams v1.0 metadata
files. This makes it possible to create a repository .conf files with
[cirros]
uri=http://download.cirros-cloud.net
format=simplestreams
to read the latest version of each CirrOS image.
Thanks,
Pino Toscano (4):
builder: add non-int revisions
builder: add simple libyajl binding
build: expose HAVE_YAJL to automake
2011 Mar 31
3
[LLVMdev] inserting exit function into IR
Hi Joshua,
I have a function foo and I want to insert exit(0) at the end of foo.
The problem is M.getFunction returns null, which is understandable. I am not
sure what to do. Below is the code snippet.
void foo(int argc, char* argv[]) {
printf("hello world\n");
exit(0); //***I want to insert this exit
}
My llvm code snippet is
vector<const Type *> params =
2014 Oct 27
2
[LLVMdev] How to call a pointer that points to a C function
I have a pointer to a function that I need to invoke without going
through llvm::Module::getOrInsertFunction. This example does not work:
static int add(int x, int y);
llvm::Value *one, *two;
llvm::Constant* addfn
= llvm::ConstantInt::get(JB->getIntPtrTy(DataLayout), (intptr_t)add);
llvm::Type* args[] = { Int32Ty, Int32Ty };
llvm::FunctionType* ftype = llvm::FunctionType::get(Int32Ty,
2006 Nov 02
6
Multiple items in the where clause while updating...
Hi
The following is a database table named friends.
+-----+------+------+-------+
| sid | id | fid | ftype |
+-----+------+------+-------+
| 30 | 1 | 2 | F |
| 31 | 1 | 3 | R |
| 32 | 3 | 2 | F |
| 33 | 3 | 4 | F |
+-----+------+------+-------+
I want to update the ftype field based on id and fid.
I want to achive the following.
Update friends
2012 Jun 18
4
[LLVMdev] Cast Pointer Address to Functions
I have a function address held in an uint64_t. I would like to cast
the function address to a function prototype and create a call to the
function in LLVM. How could I do this ?
Thanks
Xin