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 | 956a5a17713deb1b5b27893303c4f308a1bd2a62 (patch) | |
tree | 74f8b7ec7e1a35af00fa26528fb763dab049cd1e /lib/CodeGen/CGExprCXX.cpp | |
parent | 37c94bfdc82f0e3526e7f7fc33ee9c817159ed4d (diff) |
Cleanup some clang code to use new type functions instead of using cast<>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGExprCXX.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index c9f24a61bc..788bf4c37b 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -1239,8 +1239,7 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) { llvm::BasicBlock *contBB = 0; llvm::Value *allocation = RV.getScalarVal(); - unsigned AS = - cast<llvm::PointerType>(allocation->getType())->getAddressSpace(); + unsigned AS = allocation->getType()->getPointerAddressSpace(); // The null-check means that the initializer is conditionally // evaluated. |