Samuel Crow
2012-Jan-18 19:34 UTC
[LLVMdev] Fw: Should the Constant* pointer be declared with "const" or not?
Sorry! Forgot to CC the list. ----- Forwarded Message -----> From: Samuel Crow <samuraileumas at yahoo.com> > To: Stepan Dyatkovskiy <stpworld at narod.ru> > Cc: > Sent: Wednesday, January 18, 2012 1:31 PM > Subject: Re: [LLVMdev] Should the Constant* pointer be declared with "const" or not? > > Hello Stepan, > > The LLVM source code uses a relaxed view of const correctness. The const > keyword is only used when it is needed by outside code. At one time, the > documentation to LLVM said that it was written in a "tasteful subset" > of C++. Searching for those words doesn't hit anything any more at this > time. > > I'd suggest you not use the const keyword for now. > > --Sam > > > ----- Original Message ----- >> From: Stepan Dyatkovskiy <stpworld at narod.ru> >> To: llvmdev at cs.uiuc.edu >> Cc: >> Sent: Wednesday, January 18, 2012 12:51 PM >> Subject: [LLVMdev] Should the Constant* pointer be declared with > "const" or not? >> >> Hi all. >> I'm working on patch and I'm using unchangable ConstantInt objects. > So >> everywhere I'm using "const ConstantInt*". But this idea > came to >> deadlock after I tried to create ConstantVector using my vector<const >> ConstantInt*> collection. All because of next form of > ConstantVector::get: >> >> // Note: ArrayRef declared with non-constant Constant* object. >> Constant *ConstantVector::get(ArrayRef<Constant*> V); >> >> What should I do in this case? Make all my ConstantInt* pointers >> non-constant? >> >> -Stepan. >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >
Maybe Matching Threads
- [LLVMdev] Fw: Should the Constant* pointer be declared with "const" or not?
- [LLVMdev] Should the Constant* pointer be declared with "const" or not?
- [LLVMdev] How to force the creation of arrays with zeroes?
- [LLVMdev] Fwd: How to force the creation of arrays with zeroes?
- [LLVMdev] make check-lit + grep escape characters