search for: setsubclassdata

Displaying 4 results from an estimated 4 matches for "setsubclassdata".

Did you mean: getsubclassdata
2020 May 03
2
LLVM type.h question
Hi, I see this in the Type class: unsigned getSubclassData() const { return SubclassData; } void setSubclassData(unsigned val) { SubclassData = val; // Ensure we don't have any accidental truncation. assert(getSubclassData() == val && "Subclass data too large for field"); } How will the assert ever get triggered? The type is "unsigned" so how can getSubclassData() ever n...
2012 Jun 10
1
[LLVMdev] Why no setAddressSpace method?
...++ DerivedTypes.h (working copy) @@ -450,6 +450,9 @@ /// @brief Return the address space of the Pointer type. inline 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...
2014 May 16
4
[LLVMdev] Writing an address space re-numbering pass?
...nce but the fact I would need to do this hints to me that this is probably the wrong approach. - How can I change the address space number associated with a Type? Looking at the implementation it seems that ``getAddressSpace()`` just returns ``getSubclassData()`` and it also looks like I can use ``setSubClassData()`` to set this. What is "Subclass" data for? If I try to set the address space number this way it seems like a **massive** hack which is already broken if Subclass data is used for other things inside LLVM. Just in case someone asks, I can't change the frontend that produces the Mod...
2011 Feb 15
3
[LLVMdev] Structure Types and ABI sizes
Hi all, We're hitting some walls here when generating the correct structure layout for specific C++ ABI requirements, and I was wondering how much StructLayout could help. For instance, the ABI has some complicated rules on the size of derived classes (http://www.codesourcery.com/public/cxx-abi/abi.html#class-types) and LLVM struct type cannot reflect that in full. Example: // CHECK: