diff options
author | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2008-01-31 15:19:04 +0000 |
---|---|---|
committer | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2008-01-31 15:19:04 +0000 |
commit | 0e82d724eed383f84abe2a69d050c6279e5d00a3 (patch) | |
tree | 75ca5f420c5feeccdf04f1ece4932f4f0a4dc324 /CodeGen/CodeGenTypes.cpp | |
parent | 4af84313df0d2710fd57af89132e680294225cad (diff) |
Implement review feedback. Use getAsPointerType instead of cast<PointerType>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenTypes.cpp')
-rw-r--r-- | CodeGen/CodeGenTypes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CodeGen/CodeGenTypes.cpp b/CodeGen/CodeGenTypes.cpp index 7c6abc1bec..9e8a2e0ea6 100644 --- a/CodeGen/CodeGenTypes.cpp +++ b/CodeGen/CodeGenTypes.cpp @@ -95,9 +95,9 @@ CodeGenTypes::~CodeGenTypes() { /// and T is tag definition. This helper routine does not check /// relationship between T and LT. static bool isOpaqueTypeDefinition(QualType T, const llvm::Type *LT) { - if (T->isPointerType()) { + if (const PointerType* PTy = T->getAsPointerType()) { return - isOpaqueTypeDefinition(cast<PointerType>(*T).getPointeeType(), + isOpaqueTypeDefinition(PTy->getPointeeType(), cast<llvm::PointerType>(LT)->getElementType()); } if (!isa<llvm::OpaqueType>(LT)) |