search for: globalvara

Displaying 4 results from an estimated 4 matches for "globalvara".

Did you mean: globalvar
2004 Oct 13
1
[LLVMdev] creating Internal GlobalVaraibles
Here is my code, (GV is a GlobalVariable*): GV = new GlobalVariable(AI->getType(), false, GlobalValue::InternalLinkage, 0, "temp_glob", &M); I tell it to make it with internal linkage, but when I run the pass it makes them external: %temp_glob = external global [10 x int]* ; <[10 x int]**> [#uses=2] %temp_glob = external global [10 x float]* ;
2009 Jan 12
2
[LLVMdev] GlobalVaraible and Function have the same name
Hi all, I just walked across an interesting situation in Module::getOrInsertFunction(Name, Type) in the LLVM C API. In my particular case: One of the first things we do is add a global variable named foo which is a [ 100 x i64 ]. Later we add a function void foo(...) unfortunately, when we do the getOrInsertFunction we get back void (...) * bitcast ([100 x i64]* @foo_ to void (...)*)
2004 Oct 10
1
[LLVMdev] Re: Hide visible string in variable
Hi, > On Mon, 27 Sep 2004, Zhang Qiuyu wrote: > > > Is there a way to modify the string such as char a or char b? Could I > > use the way like "Replace an instruction with another Value" in Programm > > Manual? In fact, what I am interested in is string with visible > > expression, not all string, and I am trying to hide the orignal string > > by
2004 Oct 12
1
[LLVMdev] Re: Hide visible string in variable (Chris Lattner)
...; Note that you can use whatever function you wanted, obviously uppercasing > the string isn't much obfuscation. > > To do this on LLVM, you have to do these things: > > 1. Read the string data as a constant (It's an instance of ConstantArray, > which you get form the Globalvaraible with getInitializer() as you are > doing. Following your suggestion, I got some progress. Thanks again. But I am still stuck in some problems. Constant *Cstr = GV->getInitializer(); After that, I tried to use a. for(unsigned i=0;i<Cstr->getNumOperands();++i){...