aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-04-23 20:58:57 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-04-23 20:58:57 +0000
commitbe558888499e98ed4c1f0a20ce9178114e86a5e2 (patch)
tree117116f966c32f049d27b33f62e4d30597927a00 /llvm/lib/Transforms/Utils/BuildLibCalls.cpp
parentef86b4067cc152356eca7afa2673c438c80b0a40 (diff)
downloadllvm-be558888499e98ed4c1f0a20ce9178114e86a5e2.zip
llvm-be558888499e98ed4c1f0a20ce9178114e86a5e2.tar.gz
llvm-be558888499e98ed4c1f0a20ce9178114e86a5e2.tar.bz2
Remove more default address space argument usage.
These places are inconsequential in practice. llvm-svn: 207021
Diffstat (limited to 'llvm/lib/Transforms/Utils/BuildLibCalls.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/BuildLibCalls.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
index 82384a1..1539cc2 100644
--- a/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
@@ -27,7 +27,8 @@ using namespace llvm;
/// CastToCStr - Return V if it is an i8*, otherwise cast it to i8*.
Value *llvm::CastToCStr(Value *V, IRBuilder<> &B) {
- return B.CreateBitCast(V, B.getInt8PtrTy(), "cstr");
+ unsigned AS = V->getType()->getPointerAddressSpace();
+ return B.CreateBitCast(V, B.getInt8PtrTy(AS), "cstr");
}
/// EmitStrLen - Emit a call to the strlen function to the builder, for the