search for: classof

Displaying 20 results from an estimated 65 matches for "classof".

2011 Mar 18
0
[LLVMdev] [RC1] Status of Visual Studio 8, 9 and 10
...s (null) [ FAILED ] CastingTest.cast (0 ms) [----------] 1 test from CastingTest (1 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (1 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] CastingTest.cast 1 FAILED TEST Classof: 0x7aca7c Classof: 0x7aca7c Classof: 0x7aca7c Classof: 0x0 Classof: 0x7aca7c Classof: 0x0 Classof: 0x7aca7c ******************** Testing Time: 176.39s ******************** Failing Tests (2): LLVM :: Transforms/SRETPromotion/basictest.ll LLVM-Unit :: support/debug/SupportTests.exe/CastingTes...
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' /Users/bocchino/llvm-checkin/src/include/llvm/IntrinsicInst.h: In static member function 'static bool llvm::DbgDecl...
2006 Apr 07
0
[LLVMdev] CVS Broken?
...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 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' > /Users/bocchino/llvm-checkin/src/include/llvm/IntrinsicInst.h: In static > member function 'sta...
2012 Oct 05
0
[LLVMdev] TableGen: Requesting feedback for "TGContext"
...TI.rst.patch: > Add docs for setting up LLVM-style RTTI for a class hierarchy. The > attached PDF is the rendered version of this document. Please give > feedback on inaccuracies or suggested improvements for this document. These all look great, please apply. > One question regarding `classof()`s of the form: > static bool classof(const Foo *) { return true; } > Is the only purpose of this to optimize away "trivial" upcasts/isa<> > checks which are known statically? Yes. > If so, could we factor out this > case into Casting.h (using a trait like std::...
2006 Apr 07
2
[LLVMdev] CVS Broken?
...> 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 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' >> /Users/bocchino/llvm-checkin/src/include/llvm/IntrinsicInst.h: In >> static m...
2012 Jun 10
1
[LLVMdev] Why no setAddressSpace method?
...e unsigned getAddressSpace() const { return getSubclassData(); } + /// @brief Set the address space of the Pointer type. + inline void setAddressSpace(unsigned addrspace) { setSubclassData(addrspace); } + // Implement support type inquiry through isa, cast, and dyn_cast. static inline bool classof(const PointerType *) { return true; } static inline bool classof(const Type *T) { - is it wrong or undesired by some reason? This way it would be exposed to all frontends and opt passes. Best regards, - Dima. -------------- next part -------------- An HTML attachment was scrubbed... URL: <h...
2012 Oct 05
2
[LLVMdev] TableGen: Requesting feedback for "TGContext"
...uash this with 0002. 0004-docs-Add-HowToSetUpLLVMStyleRTTI.rst.patch: Add docs for setting up LLVM-style RTTI for a class hierarchy. The attached PDF is the rendered version of this document. Please give feedback on inaccuracies or suggested improvements for this document. One question regarding `classof()`s of the form: static bool classof(const Foo *) { return true; } Is the only purpose of this to optimize away "trivial" upcasts/isa<> checks which are known statically? If so, could we factor out this case into Casting.h (using a trait like std::is_base_of<>)? --Sean Si...
2017 Jul 31
2
RTTI with smart pointers
...I. 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 'classof' approach works in this case (I did try it with no success). Is it possible to have a dynamic_cast using std smart pointers in LLVM? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170731/3aadea...
2006 Apr 07
2
[LLVMdev] CVS Broken?
...g 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 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' > >>> /Users/bocchino/llvm-checkin/src/include/llvm/Intri...
2006 Apr 07
0
[LLVMdev] CVS Broken?
...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 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' >>> /Users/bocchino/llvm-checkin/src/include/llvm/IntrinsicInst.h: In stati...
2012 Oct 05
1
[LLVMdev] TableGen: Requesting feedback for "TGContext"
...able to fit right in. The top level divisions of ProgrammersManual, like "Picking the Right Data Structure for a Task", are natural topics for their own page I think. > These all look great, please apply. Landed in r165290, r165291, r165292, r165293. >> One question regarding `classof()`s of the form: >> static bool classof(const Foo *) { return true; } >> Is the only purpose of this to optimize away "trivial" upcasts/isa<> >> checks which are known statically? > > Yes. > >> If so, could we factor out this >> case into Ca...
2006 Apr 07
0
[LLVMdev] CVS Broken?
...t;> are you building (srcdir ==/!= objdir)? >>>> >>>> -Chris >>>> >>>>> /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' >>>>> /Users/bocchino/ll...
2008 Dec 10
2
[LLVMdev] dyn_cast really doesn't like multiple inheritance
...get adjusted by the cast operation, making the pointer invalid. I end up having to redefine "cast_convert_val" and other parts of the casting machinery for my type, so that it uses static_cast. 2) In every class B which derives from A, it seems like I have to have 4 overloads of 'classof': One for B, one for A, and one for each of A's top-most ancestors. Otherwise I get ambiguity errors. What I am wondering is, is this use case supported? And could it be made easier? -- Talin
2011 Mar 21
1
[LLVMdev] Text or Data symbol
On 3/21/11 2:00 PM, Damien Vincent wrote: > I reply to myself... I didn't go in the right direction in my previous > email. > > There is an easy way to tell if a GlobalValue corresponds to data or code: > const GlobalValue *GV; > if(Function::classof(GV)) > ... // process the global value as a function > else > ... // process the global value as data > > Damien You should be able to use isa<Function>(GV) to determine if GV is a function. You may have to put in an additional check to see if GV is a GlobalAlias and...
2006 Mar 14
2
[LLVMdev] Port to Solaris' Sun Studio 8
...or isa<...>(iter) results in the error messages mentioned below. ________________________________ When compiling LoadValueNumbering.cpp, I get the following errors: "~/bin/../src/include/llvm/Support/Casting.h", line 51: Error: Could not find a match for llvm::AllocationInst::classof(const llvm::ilist_iterator<llvm::Instruction>*). "~/bin/../src/include/llvm/Support/Casting.h", line 68: Where: While instantiating "llvm::isa_impl<llvm::AllocationInst, llvm::ilist_iterator<llvm::Instruction>>(const llvm::ilist_iterator<llvm::Instruction&gt...
2012 Dec 17
4
[LLVMdev] BasicBlock back()
...>(prev_iter)); errs() << "\n prev: "<<*prev<<"\n"; The terminal prints well prev and last, but I have compilation errors when trying to assign to Instruction* prev The Clang error is: "..... /home/alex/llvm/include/llvm/Support/Casting.h:51:28: error: ‘classof’ is not a member of ‘llvm::Instruction*’" If someone knows a better way to use any element from the basic block or knows why these are not working, please let me know :) Thank you, Alex -- Best regards, Alexandru Ionut Diaconescu -------------- next part -------------- An HTML attachment...
2005 Apr 22
6
[LLVMdev] isa and friends as an alternative to dynamic cast?
I see a bunch of definitions scattered throughout LLVM, and I could not find good documentation on them. I don't understand why they exist when LLVM is being compiled with RTTI enabled. It seems to me that: isa<T>(x) is a substitute for (dynamic_cast<T>(x) != NULL) and there are some other similar casting tools defined in Casting.h. Why should I use these instead of C++'s
2017 Jun 28
2
Multiple Inheritance with dyn_cast
...chy. 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 bool classof(const Base *b) { return b->hasInfo; }; }; struct Child : public Base { Child() { this->ptr = this; this->hasInfo = false; } }; struct ChildWithInfo : public Base, public Info { ChildWithInfo() { this->ptr = this; this->hasInfo = true; this->size = 10;...
2012 Jan 15
1
[LLVMdev] llvm-3.0
Hi all, I wrote code that compiled with llvm 3.0 And when I compile i llvm-3.0/llvm/include/llvm/Support/Casting.h:50:12: error: type 'unsigned long' cannot be used prior to '::' because it has no members return To::classof(&Val);                 ^~~ Do you know what's wrong ? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120115/974b9492/attachment.html>
2012 Jan 21
1
[LLVMdev] Claang bug
Hi, i have this problem llvm/Support/Casting.h:50:12: error: type 'unsigned long' cannot be used prior to '::' because it has no members return To::classof(&Val); warning: implicit conversion from 'long' to 'uint64_t' ???? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120121/209383b5/attachment.html>