diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-11 07:01:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-11 07:01:36 +0000 |
commit | 3cc5c406c436a90c8dd61f545552b844391ebf5b (patch) | |
tree | 9c48c8174732e4d1253cdf673233494e9a726e29 /lib/CodeGen/CGDebugInfo.cpp | |
parent | 1413217509ca3da8d1cd4e52feabbfe6da9bbae9 (diff) |
implement debug info for typeof()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59032 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 42139353eb..9a04a83d6e 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -15,6 +15,7 @@ #include "CodeGenModule.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" #include "clang/AST/RecordLayout.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/FileManager.h" @@ -382,8 +383,6 @@ llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty, case Type::ObjCInterface: case Type::ObjCQualifiedInterface: case Type::ObjCQualifiedId: - case Type::TypeOfExp: - case Type::TypeOfTyp: default: return llvm::DIType(); @@ -393,14 +392,18 @@ llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty, case Type::Tagged: Slot = CreateType(cast<TagType>(Ty), Unit); break; case Type::FunctionProto: case Type::FunctionNoProto: - Slot = CreateType(cast<FunctionType>(Ty), Unit); - break; + return Slot = CreateType(cast<FunctionType>(Ty), Unit); case Type::ConstantArray: case Type::VariableArray: case Type::IncompleteArray: - Slot = CreateType(cast<ArrayType>(Ty), Unit); - break; + return Slot = CreateType(cast<ArrayType>(Ty), Unit); + case Type::TypeOfExp: + return Slot = getOrCreateType(cast<TypeOfExpr>(Ty)->getUnderlyingExpr() + ->getType(), Unit); + case Type::TypeOfTyp: + return Slot = getOrCreateType(cast<TypeOfType>(Ty)->getUnderlyingType(), + Unit); } return Slot; |