It's a bool, so treat it like one. Fixes a MSVC warning.
[oota-llvm.git] / lib / Target / Target.cpp
index 375cd642de7af35922d20a5d6c82f92d252093e0..cc6be9fa7abbbd5d639c3c3310aca4d12a376d54 100644 (file)
@@ -15,6 +15,7 @@
 #include "llvm-c/Target.h"
 #include "llvm/PassManager.h"
 #include "llvm/Target/TargetData.h"
+#include <cstring>
 
 using namespace llvm;
 
@@ -40,7 +41,7 @@ unsigned LLVMPointerSize(LLVMTargetDataRef TD) {
 }
 
 LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD) {
-  return wrap(unwrap(TD)->getIntPtrType());
+  return wrap(unwrap(TD)->getIntPtrType(getGlobalContext()));
 }
 
 unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty) {
@@ -52,7 +53,7 @@ unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) {
 }
 
 unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) {
-  return unwrap(TD)->getABITypeSize(unwrap(Ty));
+  return unwrap(TD)->getTypeAllocSize(unwrap(Ty));
 }
 
 unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) {