diff options
| author | John McCall <rjmccall@apple.com> | 2011-04-07 08:22:57 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2011-04-07 08:22:57 +0000 |
| commit | 1de4d4e8cb2e9c88809fea8092bc6e835a5473d2 (patch) | |
| tree | 882a7f7c98e0dd8f015d2d7364c941026ecd19c2 /lib/CodeGen/CodeGenTypes.cpp | |
| parent | 1a7f7526b7fd817e3f49c210302d189eff981b5e (diff) | |
| download | clang-1de4d4e8cb2e9c88809fea8092bc6e835a5473d2.tar.gz clang-1de4d4e8cb2e9c88809fea8092bc6e835a5473d2.tar.bz2 clang-1de4d4e8cb2e9c88809fea8092bc6e835a5473d2.tar.xz | |
Basic, untested implementation for an "unknown any" type requested by LLDB.
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use. I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenTypes.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index b9acbc4e9b..13aa23d8d0 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -253,10 +253,11 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) { case BuiltinType::Overload: case BuiltinType::Dependent: - assert(0 && "Unexpected builtin type!"); + case BuiltinType::UnknownAny: + llvm_unreachable("Unexpected builtin type!"); break; } - assert(0 && "Unknown builtin type!"); + llvm_unreachable("Unknown builtin type!"); break; } case Type::Complex: { |
