aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-10 04:46:57 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-10 04:46:57 +0000
commit6d9e013447efb7f9fbed8d3348d6dbde208f32a7 (patch)
tree58676d117a5dc1f9d7d1148da0d993038dda2c6e /lib/CodeGen
parent30150a128c7b2488225331417153ccec75bac65c (diff)
downloadexternal_llvm-6d9e013447efb7f9fbed8d3348d6dbde208f32a7.zip
external_llvm-6d9e013447efb7f9fbed8d3348d6dbde208f32a7.tar.gz
external_llvm-6d9e013447efb7f9fbed8d3348d6dbde208f32a7.tar.bz2
Use type form of getIntPtrType.
This should be inconsequential and is work towards removing the default address space arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp2
-rw-r--r--lib/CodeGen/IntrinsicLowering.cpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 6fd75b0..44a8316 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -417,7 +417,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
// - __tlv_bootstrap - used to make sure support exists
// - spare pointer, used when mapped by the runtime
// - pointer to mangled symbol above with initializer
- unsigned PtrSize = DL->getPointerSizeInBits()/8;
+ unsigned PtrSize = DL->getPointerTypeSize(GV->getType());
OutStreamer.EmitSymbolValue(GetExternalSymbolSymbol("_tlv_bootstrap"),
PtrSize);
OutStreamer.EmitIntValue(0, PtrSize);
diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp
index d894f66..c38d4fb 100644
--- a/lib/CodeGen/IntrinsicLowering.cpp
+++ b/lib/CodeGen/IntrinsicLowering.cpp
@@ -485,11 +485,12 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
break;
}
case Intrinsic::memset: {
- Type *IntPtr = TD.getIntPtrType(Context);
+ Value *Op0 = CI->getArgOperand(0);
+ Type *IntPtr = TD.getIntPtrType(Op0->getType());
Value *Size = Builder.CreateIntCast(CI->getArgOperand(2), IntPtr,
/* isSigned */ false);
Value *Ops[3];
- Ops[0] = CI->getArgOperand(0);
+ Ops[0] = Op0;
// Extend the amount to i32.
Ops[1] = Builder.CreateIntCast(CI->getArgOperand(1),
Type::getInt32Ty(Context),