similar to: [LLVMdev] dyn_cast really doesn't like multiple inheritance

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] dyn_cast really doesn't like multiple inheritance"

2017 Jun 28
2
Multiple Inheritance with dyn_cast
Hello, I recently ran into an issue where I wanted to use dyn_cast with a Multiple Inheritance hierarchy. LLVM’s help page on RTTI claims that it can be done, and that Clang’s Decl and DeclContext implement it; however, when I try to use it I run into odd behavior. Here’s my sample code which doesn’t work: ``` struct Base { void *ptr; bool hasInfo; }; struct Info { int size; static
2018 May 03
3
RFC: virtual-like methods via LLVM-style RTTI
Hello, In an effort to help LLVM-style projects save memory, I’ve been toying with some macros that provide an alternative to C++ vtables that use LLVM-style RTTI design patterns instead. Is this something that LLVM or sub-projects think is worth pursuing? Or are the macros below too ugly/problematic? Feedback would be appreciated. Thanks, Dave //===- llvm/Support/VTable.h - LLVM-style
2018 May 04
0
RFC: virtual-like methods via LLVM-style RTTI
On 3 May 2018, at 22:09, David Zarzycki via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello, > > In an effort to help LLVM-style projects save memory, I’ve been toying with some macros that provide an alternative to C++ vtables that use LLVM-style RTTI design patterns instead. Is this something that LLVM or sub-projects think is worth pursuing? Or are the macros below
2012 Nov 29
2
[LLVMdev] [cfe-dev] UB in TypeLoc casting
Moving to LLVM dev to discuss the possibility of extending the cast infrastructure to handle this. On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote: > On Nov 18, 2012, at 5:05 PM, David Blaikie <dblaikie at gmail.com> wrote: >> TypeLoc casting looks bogus. >> >> TypeLoc derived types return true from classof when the dynamic type >>
2012 Nov 30
0
[LLVMdev] [cfe-dev] UB in TypeLoc casting
On Thu, Nov 29, 2012 at 3:49 PM, David Blaikie <dblaikie at gmail.com> wrote: > Moving to LLVM dev to discuss the possibility of extending the cast > infrastructure to handle this. > > On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote: >> On Nov 18, 2012, at 5:05 PM, David Blaikie <dblaikie at gmail.com> wrote: >>> TypeLoc
2003 Nov 15
2
[LLVMdev] C++ Casting
In compiling my software to use LLVM, I have noticed many occurrences of C style casting in LLVM header files. Since I compile with the -Wold-style-cast flag to g++, I get warnings about each of them. This isn't a big deal but I try to keep my code compilations both error and warning free (makes spotting true errors easier). I'm wondering why a new C++ (LLVM) would choose to use C style
2010 Nov 15
2
[LLVMdev] dyn_cast vs. dynamic_cast
On Nov 12, 2010, at 5:57 PM, Óscar Fuentes wrote: >> Could someone >> please explain why I should use dyn_cast instead of dynamic_cast? (I >> thought all classes have v-tables...) Thanks, > > For reducing executable size, LLVM builds with RTTI disabled where > possible. Right, but how does that relate to dyn_cast? I thought v-tables were present even when RTTI is not
2008 Apr 29
5
[LLVMdev] [PATCH] use-diet for review
Hi all, I have reported more than enough about the space savings achieved and the associated costs, here comes the current patch for review. Since this one is substantially smaller than the previous one, I did not cut it in pieces. The front part is about headers and the rest the .cpp and other files. Cheers, Gabor -------------- next part -------------- An embedded and charset-unspecified
2015 Jan 19
3
[LLVMdev] Assertion: replaceAllUses of value with new value of different type! being thrown all of a sudden
> On 2015-Jan-19, at 12:38, Frédéric Riss <friss at apple.com> wrote: > > >> On Jan 19, 2015, at 12:04 PM, Christian Schafmeister <chris.schaf at verizon.net> wrote: >> >> >> I forgot to mention this in my initial email. >> >> The build of LLVM that I was using was commit a0d5d7aed8e177cea381b3d054d80c212ece9f2c >> The date on the
2008 Apr 29
0
[LLVMdev] [PATCH] use-diet for review
On Apr 29, 2008, at 1:27 AM, Gabor Greif wrote: > Hi all, > > I have reported more than enough about the space savings achieved > and the associated costs, here comes the current patch for review. > > Since this one is substantially smaller than the previous one, I did > not cut it in pieces. The front part is about headers and the rest > the .cpp and other files. Hi
2006 Apr 07
3
[LLVMdev] CVS Broken?
I just updated from CVS, and after doing a clean rebuild I get this error: /Users/bocchino/llvm-checkin/src/include/llvm/IntrinsicInst.h: In static member function 'static bool llvm::DbgInfoIntrinsic::classof (const llvm::IntrinsicInst*)': /Users/bocchino/llvm-checkin/src/include/llvm/IntrinsicInst.h:77: error: 'dbg_declare' is not a member of 'llvm::Intrinsic'
2006 Apr 07
0
[LLVMdev] CVS Broken?
On Fri, 7 Apr 2006, Robert L. Bocchino Jr. wrote: > I just updated from CVS, and after doing a clean rebuild I get this error: Are you sure that no conflicts prevented updating from going smoothly? How are you building (srcdir ==/!= objdir)? -Chris > /Users/bocchino/llvm-checkin/src/include/llvm/IntrinsicInst.h: In static > member function 'static bool
2012 Oct 05
0
[LLVMdev] TableGen: Requesting feedback for "TGContext"
On Oct 4, 2012, at 5:15 PM, Sean Silva <silvas at purdue.edu> wrote: >> It won't cause a negative effect, go for it! Dynamic_cast is realllly slow compared to dyn_cast, it is worth the memory. > > Ok, here's the first batch. It converts the RecTy hierarchy over to > use LLVM-style RTTI. Along the way, I also wrote up a new doc "How to > set up LLVM-style
2016 Mar 30
2
[PATCH/DRAFT] Embed metadata into object file
Hi, so this is my first contribution to LLVM/clang, so I hope I come close to the required coding standards and guidelines. First, I will describe the scenario I want to solve: For a few days, the clang plugin interface allows to execute the a plugin just before the actual main action (e.g., compiling an translation unit). In my case, the plugin we're developing will analyze the AST and
2006 Apr 07
2
[LLVMdev] CVS Broken?
I did a utils/cvsupdate, and there are no conflicts. srcdir != objdir. This is on persephone. Are you not getting this error? Perhaps I should check out a fresh tree and try to compile it? Rob On Apr 7, 2006, at 11:40 AM, Chris Lattner wrote: > On Fri, 7 Apr 2006, Robert L. Bocchino Jr. wrote: >> I just updated from CVS, and after doing a clean rebuild I get >> this
2012 Oct 05
2
[LLVMdev] TableGen: Requesting feedback for "TGContext"
> It won't cause a negative effect, go for it! Dynamic_cast is realllly slow compared to dyn_cast, it is worth the memory. Ok, here's the first batch. It converts the RecTy hierarchy over to use LLVM-style RTTI. Along the way, I also wrote up a new doc "How to set up LLVM-style RTTI for your class hierarchy", which covers the previously undocumented (albeit not that
2017 Jul 31
2
RTTI with smart pointers
Hi, I would like to use std::shared_ptr in my pass. However I'm facing a problem wrt RTTI. If I have a code like: std::shared_ptr<BaseClass> x(new DerivedClass()); ... std::shared_ptr<DerivedClass> p = std::dynamic_pointer_cast<DerivedClass>(x); It does not compile since the default RTTI infrastructure is not used by LLVM. Also, it's not clear to me if the
2006 Apr 07
2
[LLVMdev] CVS Broken?
I've done several CVS head builds today .. no problems on Linux. Reid. On Fri, 2006-04-07 at 11:53 -0500, Chris Lattner wrote: > On Fri, 7 Apr 2006, Robert L. Bocchino Jr. wrote: > > > I did a utils/cvsupdate, and there are no conflicts. srcdir != objdir. This > > is on persephone. > > > > Are you not getting this error? Perhaps I should check out a fresh
2015 May 07
2
[LLVMdev] Integer ID for LLVM::Instruction*?
David, As you suggested, I try to compile the following test code: *include "llvm/IR/Instruction.h"#include "stdint.h"extern void callback(intptr_t);void foo(){ llvm::Instruction* i; intptr_t zzzz=static_cast<intptr_t>(i); callback(zzzz);}* but got this compilation error: * 'intptr_t' (aka 'long') is not allowed intptr_t
2012 Jun 10
1
[LLVMdev] Why no setAddressSpace method?
Dear LLVM, A minor thing. During opt passes it is sometimes needed to adjust the pointer address space. However, I've noticed PointerType in LLVM has only get accessor, and clang has its initial setter. Maybe better to --- DerivedTypes.h (revision 156703) +++ DerivedTypes.h (working copy) @@ -450,6 +450,9 @@ /// @brief Return the address space of the Pointer type. inline