[cfe-commits] r46613 - /cfe/trunk/CodeGen/CodeGenTypes.cpp
Lauro Ramos Venancio
lauro.venancio at gmail.com
Thu Jan 31 07:19:04 PST 2008
Author: laurov
Date: Thu Jan 31 09:19:04 2008
New Revision: 46613
URL: http://llvm.org/viewvc/llvm-project?rev=46613&view=rev
Log:
Implement review feedback. Use getAsPointerType instead of cast<PointerType>.
Modified:
cfe/trunk/CodeGen/CodeGenTypes.cpp
Modified: cfe/trunk/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CodeGenTypes.cpp?rev=46613&r1=46612&r2=46613&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/CodeGen/CodeGenTypes.cpp Thu Jan 31 09:19:04 2008
@@ -95,9 +95,9 @@
/// 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))
More information about the cfe-commits
mailing list