add an assertion for unreachable code.

llvm-svn: 67432
This commit is contained in:
Chris Lattner 2009-03-21 06:40:50 +00:00
parent 725a26b818
commit 7d5608dd72
2 changed files with 4 additions and 6 deletions

View File

@ -104,16 +104,14 @@ private:
if (getNameKind() >= CXXConstructorName &&
getNameKind() <= CXXConversionFunctionName)
return reinterpret_cast<CXXSpecialName *>(Ptr & ~PtrMask);
else
return 0;
return 0;
}
/// getAsCXXOperatorIdName
CXXOperatorIdName *getAsCXXOperatorIdName() const {
if (getNameKind() == CXXOperatorName)
return reinterpret_cast<CXXOperatorIdName *>(Ptr & ~PtrMask);
else
return 0;
return 0;
}
// Construct a declaration name from the name of a C++ constructor,
@ -177,8 +175,7 @@ public:
IdentifierInfo *getAsIdentifierInfo() const {
if (getNameKind() == Identifier)
return reinterpret_cast<IdentifierInfo *>(Ptr);
else
return 0;
return 0;
}
/// getAsOpaqueInteger - Get the representation of this declaration

View File

@ -113,6 +113,7 @@ DeclarationName::NameKind DeclarationName::getNameKind() const {
}
// Can't actually get here.
assert(0 && "This should be unreachable!");
return Identifier;
}