X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FTarget.cpp;h=2190198d8c90feb098c8ef1173698e2c6272e8f3;hb=1d6d49fbb104781cc3e9da9dcc3e36b6cbcd38b6;hp=c96235c9538a1dcd38254d7a9fa6fd61d5af0f94;hpb=3e39731e88f2d4f597cebc74388fd6650ca4f604;p=oota-llvm.git diff --git a/lib/Target/Target.cpp b/lib/Target/Target.cpp index c96235c9538..2190198d8c9 100644 --- a/lib/Target/Target.cpp +++ b/lib/Target/Target.cpp @@ -16,9 +16,9 @@ #include "llvm-c/Initialization.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/IR/Value.h" #include "llvm/InitializePasses.h" #include "llvm/PassManager.h" -#include "llvm/Wrap.h" #include "llvm/Target/TargetLibraryInfo.h" #include @@ -88,6 +88,14 @@ LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS) { return wrap(unwrap(TD)->getIntPtrType(getGlobalContext(), AS)); } +LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD) { + return wrap(unwrap(TD)->getIntPtrType(*unwrap(C))); +} + +LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, unsigned AS) { + return wrap(unwrap(TD)->getIntPtrType(*unwrap(C), AS)); +} + unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty) { return unwrap(TD)->getTypeSizeInBits(unwrap(Ty)); }