Displaying 3 results from an estimated 3 matches for "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 &...
2012 Jun 10
1
[LLVMdev] Why no setAddressSpace method?
...nterType 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 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 inl...
2014 May 16
4
[LLVMdev] Writing an address space re-numbering pass?
...trSet to make sure I don't visit a type
more than once 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...