diff options
author | Micah Villmow <villmow@gmail.com> | 2012-10-25 15:39:14 +0000 |
---|---|---|
committer | Micah Villmow <villmow@gmail.com> | 2012-10-25 15:39:14 +0000 |
commit | ea2fea2a6033983a0943fadf9689f978879feb16 (patch) | |
tree | 6d778b60bdf9067017bc63772a57b85eecd2a743 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 920cff606bea1251dcf3bfd836031741943c7f92 (diff) | |
download | bcm5719-llvm-ea2fea2a6033983a0943fadf9689f978879feb16.tar.gz bcm5719-llvm-ea2fea2a6033983a0943fadf9689f978879feb16.zip |
Cleanup some clang code to use new type functions instead of using cast<>.
llvm-svn: 166684
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 34cdaa94fd7..53de9074b44 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -1001,8 +1001,7 @@ llvm::Value *CodeGenFunction::emitArrayLength(const ArrayType *origArrayType, arrayType = getContext().getAsArrayType(eltType); } - unsigned AddressSpace = - cast<llvm::PointerType>(addr->getType())->getAddressSpace(); + unsigned AddressSpace = addr->getType()->getPointerAddressSpace(); llvm::Type *BaseType = ConvertType(eltType)->getPointerTo(AddressSpace); addr = Builder.CreateBitCast(addr, BaseType, "array.begin"); } else { |