Hi, everyone. Today I was trying to build LLVM with libc++ and C++11 enabled, and I ran into this: http://stackoverflow.com/questions/10065384/instantiation-of-a-list-with-an-incomplete-type-in-a-typedef Basically, PBQP/Graph.h forward-declares classes, then tries to get iterators for std::lists of those classes. This is technically undefined behavior. I tried fudging with the order of declarations for a while, but gave up after realizing there's not an easy way out. Is anyone else building LLVMCodeGen with libc++ and C++11? Is anyone else seeing this? Thanks, Jordan
On Sat, Oct 20, 2012 at 1:47 PM, Jordan Rose <jordan_rose at apple.com> wrote:> Hi, everyone. Today I was trying to build LLVM with libc++ and C++11 enabled, and I ran into this: > > http://stackoverflow.com/questions/10065384/instantiation-of-a-list-with-an-incomplete-type-in-a-typedef > > Basically, PBQP/Graph.h forward-declares classes, then tries to get iterators for std::lists of those classes. This is technically undefined behavior. I tried fudging with the order of declarations for a while, but gave up after realizing there's not an easy way out. > > Is anyone else building LLVMCodeGen with libc++ and C++11? Is anyone else seeing this?Yeah, I think Lang (author of PBQP) came across this at some point. We've discussed it & we didn't immediately come up with any great idea of how to solve it... certainly something that still needs some thought (& ultimately, a fix ;))
On 20.10.2012, at 22:47, Jordan Rose <jordan_rose at apple.com> wrote:> Hi, everyone. Today I was trying to build LLVM with libc++ and C++11 enabled, and I ran into this: > > http://stackoverflow.com/questions/10065384/instantiation-of-a-list-with-an-incomplete-type-in-a-typedef > > Basically, PBQP/Graph.h forward-declares classes, then tries to get iterators for std::lists of those classes. This is technically undefined behavior. I tried fudging with the order of declarations for a while, but gave up after realizing there's not an easy way out. > > Is anyone else building LLVMCodeGen with libc++ and C++11? Is anyone else seeing this?I was hitting this problem a while ago, but it's not reproducible when compiling llvm with clang trunk and libc++ trunk. - Ben
This is a known issue with the current PBQP data structures. I'm working on an overhaul of the PBQP allocator at the moment which should address this. - Lang. On Sat, Oct 20, 2012 at 2:08 PM, Benjamin Kramer <benny.kra at gmail.com>wrote:> > On 20.10.2012, at 22:47, Jordan Rose <jordan_rose at apple.com> wrote: > > > Hi, everyone. Today I was trying to build LLVM with libc++ and C++11 > enabled, and I ran into this: > > > > > http://stackoverflow.com/questions/10065384/instantiation-of-a-list-with-an-incomplete-type-in-a-typedef > > > > Basically, PBQP/Graph.h forward-declares classes, then tries to get > iterators for std::lists of those classes. This is technically undefined > behavior. I tried fudging with the order of declarations for a while, but > gave up after realizing there's not an easy way out. > > > > Is anyone else building LLVMCodeGen with libc++ and C++11? Is anyone > else seeing this? > > I was hitting this problem a while ago, but it's not reproducible when > compiling llvm with clang trunk and libc++ trunk. > > - Ben > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121020/ed5eebd2/attachment.html>
Seemingly Similar Threads
- [LLVMdev] Unable to build PBQP/Graph.h with libc++
- [LLVMdev] Unable to build PBQP/Graph.h with libc++
- [LLVMdev] Unable to build PBQP/Graph.h with libc++
- [LLVMdev] PBQP & CalcSpillWeights
- [LLVMdev] Supporting Complex Register Allocation Constraints (PBQP Allocator Status Update)