similar to: Is ArrayRef supposed to be immutable?

Displaying 20 results from an estimated 30000 matches similar to: "Is ArrayRef supposed to be immutable?"

2017 Oct 01
2
Is ArrayRef supposed to be immutable?
It wraps a constant T* and a size_t, so I'm surprised std::sort works. It shouldn't. On Sep 30, 2017 5:22 PM, "Daniel Berlin via llvm-dev" < llvm-dev at lists.llvm.org> wrote: It seems like ArrayRefs are supposed to be immutable ( However, as far as i can tell, the iterators are defined wrong to make this true. While ArrayRef<int> Foo(Something); Foo[0] = 5; will
2017 Oct 01
2
Is ArrayRef supposed to be immutable?
+1, totally a bug. That’s the domain of MutableArrayRef. -Chris > On Oct 1, 2017, at 6:52 AM, David Blaikie via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > +1 seems like a bug > > On Sun, Oct 1, 2017 at 12:35 AM Reid Kleckner via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > It wraps a constant T* and a size_t, so
2014 Aug 22
4
[LLVMdev] Addressing const reference in ArrayRef
On Fri, Aug 22, 2014 at 10:16 AM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: >> On 2014-Aug-21, at 10:39, David Blaikie <dblaikie at gmail.com> wrote: >> >> On Thu, Aug 21, 2014 at 10:34 AM, Reid Kleckner <rnk at google.com> wrote: >>> Is there some way we can get lifetime extension of temporaries to kick in >>> here? >>
2019 May 03
3
ArrayRef vs SmallVectorImpl
It is suggested in the documentation that if you would have declared a function parameter as SmallVector<Foo,N>&, it is better to instead declare it as SmallVectorImpl<Foo>&. This makes sense, but it seems to me that it is better still to declare it as ArrayRef<Foo>; a quick test suggests it compiles to the same (highly efficient) code, and adds a bit more flexibility in
2014 Aug 21
2
[LLVMdev] Addressing const reference in ArrayRef
On Thu, Aug 21, 2014 at 10:34 AM, Reid Kleckner <rnk at google.com> wrote: > Is there some way we can get lifetime extension of temporaries to kick in > here? Nope - since the temporary is a subexpression - not the thing being declared. > > > On Thu, Aug 21, 2014 at 8:05 AM, David Blaikie <dblaikie at gmail.com> wrote: >> >> Yeah - I suspect there are just
2014 Aug 22
2
[LLVMdev] Addressing const reference in ArrayRef
On Fri, Aug 22, 2014 at 11:22 AM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > >> On 2014-Aug-22, at 10:43, David Blaikie <dblaikie at gmail.com> wrote: >> >> Yep - the convenience of one-element->ArrayRef is "cute" at best, I >> think. Having to wrap it doesn't seem detrimental. Would have to look >> at some numbers,
2017 Feb 22
2
RFC: Adding llvm::ThinStream
Haven't got to this but would like to take a look/review it before it goes in. *skimming over some of the description* Sounds like 'stream' might not be the right terminology - since they return pointers into data that (I think) remains valid for the life of the stream? (this also makes me wonder a bit about memory usage if the cross-block operation is used a lot (causing
2017 Feb 19
5
RFC: Adding llvm::ThinStream
Some background: A while back while working on code to read / write PDB files, I came up with Yet Another Stream Abstraction. Note that LLVM already has a few. Off the top of my head, theres: 1) `MemoryBuffer` and its associated class hierarchy 2) `raw_ostream` and it's associated classes. 3) `DataExtractor` which is used for reading from a StringRef. There's probably more, and
2018 Nov 03
0
Suggestion: Make CRAN source URLs immutable
FWIW, you can get the URL and extract the link with extension from there. Archived packages are always tarballs, so that makes the following possible: url <- "https://cran.r-project.org/package=httr&version=1.3.0" library(RCurl) pkgurl <- gsub(".*(https://cran.+\\.tar.gz).*", "\\1", getURL(url)) install.packages(pkgurl, type
2014 Jul 18
2
[LLVMdev] Bug in llvm/ADT/ArrayRef.h?
Hi, I think I ran into a rather subtle bug inside llvm/ADT/ArrayRef.h which only shows up when compiling the code with GCC-4.8 with switched-off optimizations. (Both clang and GCC-4.7 don't trigger the bug.) I already filed a bug against GCC-4.8 which was rejected by the GCC-folks as being invalid, because the code (basically ArrayRef.h) "is doing something bad - it's retaining a
2018 Nov 02
2
Suggestion: Make CRAN source URLs immutable
On Wed, 24 Oct 2018 at 11:40, Kurt Hornik <Kurt.Hornik at wu.ac.at> wrote: > > >>>>> Kurt Wheeler writes: > > Try e.g. > > https://cran.r-project.org/package=httr&version=1.3.1 > https://cran.r-project.org/package=httr&version=1.3.0 This is a nice feature that I didn't know. I recently proposed enforcing this scheme in Fedora's packaging
2014 Aug 20
3
[LLVMdev] Addressing const reference in ArrayRef
Analyzing why GCC failed to build LLVM recently, one root cause lies in definition of ArrayRef: // ArrayRef.h: ArrayRef(const T &OneElt) : Data(&OneElt), Length(1) {} Here address of const reference is taken and stored to an object. It is believed that live range of const reference is only at the function call site, escaping of its address to an object with a longer live range is invalid.
2018 Sep 03
2
Immutable backing files
Hi list, suppose I have an immutable (ie: due to a read-only snapshot) backing file. After creating an overlay file with "qemu-img create -f qcow2 -o backing_file=/path/to/immutable/file.img current.qcow2", libvirt refuse to start the virtual machine and exits with an error stating "Could not open backing file /path/to/immutable/file.img: Permission denied". From my
2014 Aug 21
2
[LLVMdev] Addressing const reference in ArrayRef
David Blaikie <dblaikie at gmail.com> writes: > I seem to recall discussing this before - is there an existing llvm > bug filed, another email thread or something (or perhaps it was just > an IRC conversation)? It would be good to keep all the discussion > together or at least reference the prior (llvm community) discussion. I'm not sure if it's been discussed before,
2018 Sep 04
0
Re: Immutable backing files
Il 03-09-2018 13:14 Gionatan Danti ha scritto: > Hi list, > suppose I have an immutable (ie: due to a read-only snapshot) backing > file. > > After creating an overlay file with "qemu-img create -f qcow2 -o > backing_file=/path/to/immutable/file.img current.qcow2", libvirt > refuse to start the virtual machine and exits with an error stating > "Could not
2018 Sep 06
2
Re: Immutable backing files
On Tue, Sep 04, 2018 at 17:32:49 +0200, Gionatan Danti wrote: > Il 03-09-2018 13:14 Gionatan Danti ha scritto: > > Hi list, > > suppose I have an immutable (ie: due to a read-only snapshot) backing > > file. > > > > After creating an overlay file with "qemu-img create -f qcow2 -o > > backing_file=/path/to/immutable/file.img current.qcow2", libvirt
2014 Aug 21
2
[LLVMdev] Addressing const reference in ArrayRef
Yeah - I suspect there are just too many cases where we use this ctor correctly: where the ArrayRef is only a temporary to a function call. Perhaps this is a problem for which the best solution is a clang-tidy checker - though I'm not sure if we have good integration there yet. (& yes, Andreas, that looks like the previous thread - thanks!) On Thu, Aug 21, 2014 at 5:09 AM, Andreas Weber
2019 Sep 23
0
warnung: base variable (battery.runtime.low) is immutable
Hi, I am using the NUT Software 2.7.4 (Ubuntu Repository) on Ubuntu 18.04. Configuring a UPS with the snmp-ups driver and overriding the battery.runtime.low variable leads to following warnung/error: Sep 23 11:10:08 hostname snmp-ups[27115]: dstate_setflags: base variable (battery.runtime.low) is immutable Default for battery.runtime.low is 180 seconds. My idea is to increase the value to
2018 Nov 03
1
Suggestion: Make CRAN source URLs immutable
On Sat, 3 Nov 2018 at 11:54, Joris Meys <jorismeys at gmail.com> wrote: > > FWIW, you can get the URL and extract the link with extension from there. Archived packages are always tarballs, so that makes the following possible: > > url <- "https://cran.r-project.org/package=httr&version=1.3.0" > > library(RCurl) > > pkgurl <-
2014 Oct 24
1
Specify hard disk type (immutable) in the domain.xml file
P { margin-bottom: 0.21cm; }Hi! I'm using libvirt withVirtual Box. I have installed libvirt 0.10.2 and Virtual Box 4.1. I want to use "virsh define"to define my Virtual Box virtual machine. My question is: In my domain.xml, how can Ispecify that my hard disk is of type immutable/ multi attach etc. Can I use som kind oftag or attribute, something like this: <disk