Index: include/llvm/Target/TargetMachine.h =================================================================== --- include/llvm/Target/TargetMachine.h +++ include/llvm/Target/TargetMachine.h @@ -138,7 +138,13 @@ /// Get the pointer size for this target. /// /// This is the only time the DataLayout in the TargetMachine is used. - unsigned getPointerSize() const { return DL.getPointerSize(); } + unsigned getPointerSize(unsigned AS = 0) const { + return DL.getPointerSize(AS); + } + + unsigned getPointerSizeInBits(unsigned AS = 0) const { + return DL.getPointerSizeInBits(AS); + } /// \brief Reset the target options based on the function's attributes. // FIXME: Remove TargetOptions that affect per-function code generation