[llvm-dev] LLVM type.h question (original) (raw)
James Courtier-Dutton via llvm-dev llvm-dev at lists.llvm.org
Sun May 3 16:06:06 PDT 2020
- Previous message: [llvm-dev] _ExtInt, LLVM integers and constant time
- Next message: [llvm-dev] LLVM type.h question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 not equal val ? Where does the truncation take place?
Kind Regards
James
- Previous message: [llvm-dev] _ExtInt, LLVM integers and constant time
- Next message: [llvm-dev] LLVM type.h question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]