Annotations are now passed around as const objects

llvm-svn: 435
This commit is contained in:
Chris Lattner 2001-09-07 16:28:25 +00:00
parent b68baea2ed
commit 5e89d7c81c
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class TargetData {
unsigned char PointerAlignment; // Defaults to 8 bytes
AnnotationID AID; // AID for structure layout annotation
static Annotation *TypeAnFactory(AnnotationID, Annotable *, void *);
static Annotation *TypeAnFactory(AnnotationID, const Annotable *, void *);
public:
TargetData(const string &TargetName, unsigned char PtrSize = 8,
unsigned char PtrAl = 8, unsigned char DoubleAl = 8,
@ -65,7 +65,7 @@ public:
const vector<ConstPoolVal*> &Indices) const;
inline const StructLayout *getStructLayout(const StructType *Ty) const {
return (const StructLayout*)((Value*)Ty)->getOrCreateAnnotation(AID);
return (const StructLayout*)((const Type*)Ty)->getOrCreateAnnotation(AID);
}
};