search for: createglobalstr

Displaying 14 results from an estimated 14 matches for "createglobalstr".

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: __ZN4llvm13IRBuilderBase18CreateGlobalStringEPKcRKNS_5TwineE > Referenced from: > /Users/g...
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: /Users/georgebaah/llvm_dir/llvm-2.8/Debug+Ass...
2008 Nov 16
2
[LLVMdev] How do I insert a printf call in the IR?
...eed to put the string constant into a GlobalVariable (which is a Value). This is a bit tricky if you're using the direct API. I suggest using "llc -march=cpp" on a program that does printf("Hello world!"); Using IRBuilder is easier. Starting with LLVM 2.4, there's a CreateGlobalString function that takes a const char *String and returns a Value*. Nick > Thanks! > Mrunal > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmde...
2012 May 09
1
[LLVMdev] 3.1 API Breakage
...at 7:16 PM, Albert Graef <Dr.Graef at t-online.de> wrote: > Now I've run into another issue: The ConstantArray::get() method for > constructing a string  constant from a char* seems to be gone. Is there > a replacement for that somewhere? ConstantDataArray::getString. IRBuilder::CreateGlobalString might also be useful in some cases. > BTW, this isn't mentioned in the release notes yet. Hmm... might be worth a mention. -Eli
2018 Apr 04
1
Call printf with new args
Hello, My code: (CallInst *CI, IRBuilder<> &B) SmallVector<Value *, 8> args; Value *v = B.CreateGlobalString("hi", "str"); args.push_back(v); SmallVector<Type*, 8> params; params.push_back(v->getType()); Module *M = B.GetInsertBlock()->getParent()->getParent(); FunctionType *printfType = FunctionType::get(B.getInt32Ty(), params, true); Cons...
2008 Nov 16
0
[LLVMdev] How do I insert a printf call in the IR?
...eed to put the string constant into a GlobalVariable (which is a Value). This is a bit tricky if you're using the direct API. I suggest using "llc -march=cpp" on a program that does printf("Hello world!"); Using IRBuilder is easier. Starting with LLVM 2.4, there's a CreateGlobalString function that takes a const char *String and returns a Value*. Nick > Thanks! > Mrunal > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmde...
2008 Nov 16
2
[LLVMdev] How do I insert a printf call in the IR?
Hi Everyone, I want to generate IR for the following C code printf("Hello World!"); To insert a printf call in the IR, I use Function* myPrint = M.getFunction("printf"); to get the function from my symbol table. Once I have the function to make a call to this function I use CallInst::Create(myPrint, args.begin(), args.end(),"", B); But I am not being able to
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 is the CreateGlobalStringPtr which is throwing the error. This is LLVM 3.0....
2013 Aug 19
4
[LLVMdev] Generating GetElementPtr inlined in a function argument list programmatically
...LVM 3.2. Is there a way to generate "inlined" GetElementPtr instructions when calling a function just like the first example programmatically? -------------------------------------------------------------------BasicBlock* bb = (omitted)IRBuilder<> irb(bb);Value* global_str_ptr = irb.CreateGlobalString(bbn, "bbname");std::vector<Value*> indices;indices.push_back(ConstantInt::get(IntegerType::getInt32Ty(getGlobalContext()), 0));indices.push_back(ConstantInt::get(IntegerType::getInt32Ty(getGlobalContext()), 0));GetElementPtrInst* gep_str = GetElementPtrInst::CreateInBounds(global...
2012 Jan 22
0
[LLVMdev] CreateGlobalStringPtr giving linker errors
.../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 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 is the CreateGlobalStringPtr which is throwing the error....
2017 May 07
4
Email list just for front end developers?
On Sat, 6 May 2017 21:38:50 -0700 Sanjoy Das <sanjoy at playingwithpointers.com> wrote: > Hi Perry, > > On Sat, May 6, 2017 at 2:55 PM, Perry E. Metzger > <perry at piermont.com> wrote: > >> Let me put it this way -- I'm pretty sure if you take it on > >> yourself to answer beginner questions on llvm-dev promptly, > >> nobody will *complain*.
2012 May 08
2
[LLVMdev] 3.1 API Breakage
Hi Anton, On 05/08/2012 05:05 PM, Anton Korobeynikov wrote: > I believe examples/ExceptionDemo contains sample code which sets > TargetOptions flags. > In particular, llvm::EngineBuilder class has setTargetOptions() method > which does all necessary magic here. Cool, that's certainly easy enough. :) Thanks, Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University
2012 May 09
0
[LLVMdev] 3.1 API Breakage
Now I've run into another issue: The ConstantArray::get() method for constructing a string constant from a char* seems to be gone. Is there a replacement for that somewhere? BTW, this isn't mentioned in the release notes yet. -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de WWW:
2013 Aug 19
0
[LLVMdev] Generating GetElementPtr inlined in a function argument list programmatically
...nerate "inlined" GetElementPtr instructions when calling a function just like the first example programmatically? > > ------------------------------------------------------------------- > BasicBlock* bb = (omitted) > IRBuilder<> irb(bb); > Value* global_str_ptr = irb.CreateGlobalString(bbn, "bbname"); > std::vector<Value*> indices; > indices.push_back(ConstantInt::get(IntegerType::getInt32Ty(getGlobalContext()), 0)); > indices.push_back(ConstantInt::get(IntegerType::getInt32Ty(getGlobalContext()), 0)); > GetElementPtrInst* gep_str = GetElementPtrIns...