search for: srsr

Displaying 7 results from an estimated 7 matches for "srsr".

Did you mean: srs
2013 May 02
2
[LLVMdev] int to StringRed conversion
...at you can take advantage of the type system of LLVM bitcode, and don't have to cast the integers from/to strings by yourself. Logan On Thu, May 2, 2013 at 11:10 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > The problem is that I want to pass only srsr which is an int. "marked" was > just an example :) > > Thanks you! > > > On Thu, May 2, 2013 at 5:06 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote: > >> I'm not familiar with this, but maybe you can try: >> >> StringRef tst = ("m...
2013 May 02
0
[LLVMdev] int to StringRed conversion
The problem is that I want to pass only srsr which is an int. "marked" was just an example :) Thanks you! On Thu, May 2, 2013 at 5:06 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote: > I'm not familiar with this, but maybe you can try: > > StringRef tst = ("marked" + Twine(srsr)).str(); > >...
2013 May 02
0
[LLVMdev] int to StringRed conversion
...stem of LLVM bitcode, and > don't have to cast the integers from/to strings by yourself. > > Logan > > > On Thu, May 2, 2013 at 11:10 PM, Alexandru Ionut Diaconescu < > alexandruionutdiaconescu at gmail.com> wrote: > >> The problem is that I want to pass only srsr which is an int. "marked" >> was just an example :) >> >> Thanks you! >> >> >> On Thu, May 2, 2013 at 5:06 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote: >> >>> I'm not familiar with this, but maybe you can try: >>&g...
2013 May 02
4
[LLVMdev] int to StringRed conversion
Hello everyone, I have an integer and I want to convert it to StringRef in order to set metadata. setMetadata->(StringRef, MDNode*); It is there a native LLVM way to do it? 1. In the llvm::APSInt Class is toString() method, which seems it is not for this purpose 2. itoa and string are not part of LLVM 3. stringstream is not part of LLVM 4. to_string is not part of LLVM 5. any casting method?
2013 May 03
2
[LLVMdev] set of integers to metadata
...etSigned(Type::getInt64Ty(C),*2*), ConstantInt::getSigned(Type::getInt64Ty(C),*3*) }; but I want to add metadata using the array[] elements with integers. *3.* also, not so appropriate, I tried to convert the concatenated array elements into a StringRef tsts = llvm::Twine(srsr).str();, but I have segfault errors. In addition, this method is not exactly what I need. How should I add all the array elements to metadata one by one, like I am trying to do using values[] ? Thank you much ! -------------- next part -------------- An HTML attachment was scrubbed... URL: <ht...
2013 May 03
0
[LLVMdev] set of integers to metadata
...*2*), > ConstantInt::getSigned(Type::getInt64Ty(C),*3*) > }; > but I want to add metadata using the array[] elements with integers. > > *3.* also, not so appropriate, I tried to convert the concatenated array > elements into a StringRef tsts = llvm::Twine(srsr).str();, but I have > segfault errors. In addition, this method is not exactly what I need. > > How should I add all the array elements to metadata one by one, like I am > trying to do using values[] ? > > Thank you much ! > -- Best regards, Alexandru Ionut Diaconescu -----...
2013 May 02
0
[LLVMdev] int to StringRed conversion
Hi, I think you may try to use llvm::Twine(int). For example, to convert 30 to string, you can use: Twine(30).str() To convert the string back to integer, you can try the StringRef::getAsInteger(unsigned, APInt &). For example: APInt i; str.getAsInteger(/*radix=*/ 10, /*output=*/ i); Sincerely, Logan On Thu, May 2, 2013 at 9:53 PM, Alexandru Ionut Diaconescu <