How is this handled in clang for OpenCL address spaces like Local/Global/Constant? Maybe we can follow that same convention.
Micah > -----Original Message----- > From: [email protected] [mailto:cfe-commits- > [email protected]] On Behalf Of John McCall > Sent: Thursday, October 11, 2012 4:15 PM > To: Eric Christopher > Cc: Micah Villmow; [email protected] > Subject: Re: [cfe-commits] r165726 - > /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp > > On Oct 11, 2012, at 4:07 PM, Eric Christopher wrote: > >> - > .toCharUnitsFromBits(target.getPointerSizeInBits()); > >> + > .toCharUnitsFromBits(target.getPointerSizeInBits(0)); > >> addr.push_back(llvm::ConstantInt::get(Int64Ty, > offset.getQuantity())); > >> addr.push_back(llvm::ConstantInt::get(Int64Ty, > llvm::DIBuilder::OpDeref)); > >> addr.push_back(llvm::ConstantInt::get(Int64Ty, > llvm::DIBuilder::OpPlus)); > >> > > > > I'll acknowledge that I'm not the best example for this, but perhaps > > an enum that > > is "DefaultAddressSpace" or something less wordy would be a good idea > to avoid > > magic numbers? > > Sounds like a great idea to me. TR 18037 calls this the generic > address > space, so maybe llvm::GenericAddrSpace? > > John. > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
