similar to: [LLVMdev] llvm-gcc compilation and ConstantArray::getAsString

Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] llvm-gcc compilation and ConstantArray::getAsString"

2012 Feb 17
0
[LLVMdev] llvm-gcc compilation and ConstantArray::getAsString
Hi Giovanni, > I'm trying to compile llvm-gcc, but the compilation fails. This is due to > the fact that the ConstantArray class does no longer have the getAsString > method. llvm-gcc is dead. Please use dragonegg (which is analogous to llvm-gcc, but for gcc-4.5/gcc-4.6) or clang instead. Ciao, Duncan.
2012 Feb 11
1
[LLVMdev] Hello + Noobish question
Hi everyone! I recently subscribed your mailing list, as I find the LLVM project interesting. I've read the document known as "Compiler hacker's introduction to LLV"[1], and I've learnt about LLVM-IR. I was wondering about the impact of such a representation on mixing code from different languages. Suppose we have a huge library X written in language LX, which we would be
2012 Nov 29
1
[LLVMdev] ConstantArray::getAsString in LLVM 3.1
Hello, I'm working on porting a project to LLVM 3.1. Unfortunately, my project makes very heavy use of ContantArray::getAsString() -- which was removed in LLVM 3.1. Is there an equivalent in 3.1? In other words, what is the best way to get the value of a string that was stored in a ConstantArray? Thanks, David -------------- next part -------------- An HTML attachment was scrubbed...
2005 Jan 31
3
installing R on Mac OS X
I have a problem in installing R-2.0.1, downloaded from the R web site, on mac o sx version 10.3.7. when i launch the command ./configure i get the following error message: checking for C compiler default output file name... configure: error: C compiler cannot create executables i've aleady insalled Xcode. the version of the gcc in 3.3. what can i do? thanks silvia
2010 Jul 16
2
[LLVMdev] Strange behavior when converting arrays to strings
Hello, I found saw some strange behavior (to me) when converting constant arrays to strings. Consider the following example: std::string Text = "HelloWorld"; unsigned TextLengthBefore = Text.length(); ConstantArray *pArray = dyn_cast<ConstantArray>(llvm::ConstantArray::get(pModule->getContext(), Text, true)); unsigned NumElements = pArray->getNumOperands(); Text =
2006 Mar 27
1
[LLVMdev] could you give me some advice ?
excuse me for bother you again . a little supplement Constant* c = findValue(m,"E1$entry"); Constant* c2 = findValue(m,"E1$str"); I can get string object from c2 string s = cast<ConstantArray>(c2)->getAsString(); but it is not applicable for c string s= cast<ConstantArray>(c)->getAsString(); // Assert Fail because c is ConstantExpr::GetElementPtr
2010 Jul 28
1
[LLVMdev] Strange behavior when converting arrays to strings
Hi Javier, > I found saw some strange behavior (to me) when converting constant > arrays to strings. Consider the following example: > > std::string Text = "HelloWorld"; > > unsigned TextLengthBefore = Text.length(); > > ConstantArray *pArray = > dyn_cast<ConstantArray>(llvm::ConstantArray::get(pModule->getContext(), > Text, true)); from
2010 Jul 28
0
[LLVMdev] Strange behavior when converting arrays to strings
Hi, I haven't seen a response and I'm curious if I should submit a patch for this. Thanks, Javier From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Martinez, Javier E Sent: Friday, July 16, 2010 3:20 PM To: llvmdev at cs.uiuc.edu Subject: [LLVMdev] Strange behavior when converting arrays to strings Hello, I found saw some strange behavior (to
2012 Nov 16
2
[LLVMdev] porting to 3.1: ConstantDataArray
Hi, In llvm 3.0 llvm::ConstantArray had a ::getAsCString() method that returned the buffer as a std::string. Now it seems that 3.1 this method dissapeared. I found that llvm::ConstantDataArray has a method called getAsString(), but it returns a Constant*. What is the safe way to retrieve the pointer of the Constant array as a C string?
2013 Jun 25
4
[LLVMdev] get value
Hi Cristianno, Thank you, it works :) with an extra cast:                                     Value *v ......                                     ConstantInt* RR = (ConstantInt *)v;                                     uint64_t VV = (RR->getValue()).getLimitedValue();                                     errs()<<"\nRR  "<<VV<<"\n";
2013 Apr 20
2
[LLVMdev] How to cast Value* to ConstantDataArray*
I extended the LLVM Kaleidoscope example to support Strings. I added a StringExprAST, which has the virtual Codegen method impl as follows: Value *StringExprAST::Codegen() { StringRef r(Val); return ConstantDataArray::getString(getGlobalContext(), r, false); } I am trying to concatenate Strings and have a ConcatExprAST with its Codegen method. Upon trying to access the data in the
2013 Jun 25
2
[LLVMdev] get value
Hello ! This may be a trivial question, but I cannot get fields from a Value type. If my Value is i32 1, how can I store 1 in a different structure (an integer) ? For the type, I have getType(). For the value, I see no method in Value.h. I tried to cast to ConstantExpr and then to get operands, or cast to ConstantDataArray and then use getAsString(), but is not working. How should I get the
2004 Dec 09
1
[LLVMdev] Question about insert call func with pionter parameter
Hi, I got a problem when I am trying to insert a call function with pointer arguments. The function C proto-type is the following, void stat_func(char *); >ConstantArray *Cstr = dyn_cast<ConstantArray>(gI->getInitializer()); ...... >Function *exFunc = M->getOrInsertFunction("stat_func", Type::VoidTy, PointerType::get(Type::SByteTy),0); >std::vector<Value*>
2013 Apr 21
2
[LLVMdev] How to cast Value* to ConstantDataArray*
ConstantDataArray * cda = cast<ConstantDataArray>(v); throws this error: Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /Users/rcatlin1/lldb/llvm/include/llvm/Support/Casting.h, line 208 Thanks for the help. Richard Catlin On Sat, Apr 20, 2013 at 3:37 PM, Sean Silva <silvas at purdue.edu> wrote:
2013 Feb 27
3
[LLVMdev] llvm get annotations
Hello everyone ! I followed http://stackoverflow.com/questions/4976298/modern-equivalent-of-llvm-annotationmanagerin order to get annotations from my target bytecode. All the examples that I give in the following is related to the code from that link. I have `__attribute__((annotate("DS"))) int f=0;` into the target C++ program and the related IR code: @.str = private unnamed_addr
2006 Oct 16
0
[LLVMdev] initializer does not match global variable type.
Hi Todd, On Mon, 2006-10-16 at 14:04 -0700, Anderson, Todd A wrote: > >-----Original Message----- > >From: llvmdev-bounces at cs.uiuc.edu > >[mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Chris Lattner > >Sent: Monday, October 16, 2006 2:09 PM > >To: LLVM Developers Mailing List > >Subject: Re: [LLVMdev] initializer does not match global variable type.
2006 Oct 16
2
[LLVMdev] initializer does not match global variable type.
>-----Original Message----- >From: llvmdev-bounces at cs.uiuc.edu >[mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Chris Lattner >Sent: Monday, October 16, 2006 2:09 PM >To: LLVM Developers Mailing List >Subject: Re: [LLVMdev] initializer does not match global variable type. > >On Mon, 16 Oct 2006, Anderson, Todd A wrote: >> I have an objective-c file, bar.m,
2006 Mar 25
1
[LLVMdev] could you give me some advice ?
hi I have one llvm program like this : ... ; define ConstantArray "E1$str" = internal constant [3 x sbyte] c"E1\00" ; use getPtrPtrFromArrayPtr to define SByte* from ConstantArray "E1$entry" = internal constant sbyte* getelementptr ([3 x sbyte]* "E1$str", uint 0, uint 0) ... when i want to get std::string object from this declaration in
2012 Nov 16
0
[LLVMdev] porting to 3.1: ConstantDataArray
On 16 November 2012 13:55, charles quarra <charllsnotieneningunputocorreo at gmail.com> wrote: > In llvm 3.0 llvm::ConstantArray had a ::getAsCString() method that > returned the buffer as a std::string. Now it seems that 3.1 this > method dissapeared. > > I found that llvm::ConstantDataArray has a method called > getAsString(), but it returns a Constant*. In 3.1
2013 Apr 20
0
[LLVMdev] How to cast Value* to ConstantDataArray*
On Sat, Apr 20, 2013 at 5:15 PM, Richard Catlin <richard.m.catlin at gmail.com>wrote: > I extended the LLVM Kaleidoscope example to support Strings. I added a > StringExprAST, which has the virtual Codegen method impl as follows: > > Value *StringExprAST::Codegen() { > StringRef r(Val); > return ConstantDataArray::getString(getGlobalContext(), r, false); > } >