summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2011-09-23 05:06:16 +0000
committerDavid Blaikie <dblaikie@gmail.com>2011-09-23 05:06:16 +0000
commit83d382b1cad133cb163a68dd7149fae2802275e1 (patch)
tree20f63870b2fa8c4a5b49076275bc8b60224f0edc /clang/lib/Rewrite
parent42fe6bd5f230d4c88377e24ace7a226c178dd2b4 (diff)
downloadbcm5719-llvm-83d382b1cad133cb163a68dd7149fae2802275e1.tar.gz
bcm5719-llvm-83d382b1cad133cb163a68dd7149fae2802275e1.zip
Switch assert(0/false) llvm_unreachable.
llvm-svn: 140367
Diffstat (limited to 'clang/lib/Rewrite')
-rw-r--r--clang/lib/Rewrite/RewriteObjC.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Rewrite/RewriteObjC.cpp b/clang/lib/Rewrite/RewriteObjC.cpp
index fa287fd5349..4f9c1748ce8 100644
--- a/clang/lib/Rewrite/RewriteObjC.cpp
+++ b/clang/lib/Rewrite/RewriteObjC.cpp
@@ -1066,7 +1066,7 @@ void RewriteObjC::RewriteProtocolDecl(ObjCProtocolDecl *PDecl) {
void RewriteObjC::RewriteForwardProtocolDecl(ObjCForwardProtocolDecl *PDecl) {
SourceLocation LocStart = PDecl->getLocation();
if (LocStart.isInvalid())
- assert(false && "Invalid SourceLocation");
+ llvm_unreachable("Invalid SourceLocation");
// FIXME: handle forward protocol that are declared across multiple lines.
ReplaceText(LocStart, 0, "// ");
}
@@ -2063,7 +2063,7 @@ Stmt *RewriteObjC::RewriteObjCTryStmt(ObjCAtTryStmt *S) {
// declares the @catch parameter).
ReplaceText(rParenLoc, bodyBuf-rParenBuf+1, " = _caught;");
} else {
- assert(false && "@catch rewrite bug");
+ llvm_unreachable("@catch rewrite bug");
}
}
// Complete the catch list...
@@ -3434,7 +3434,7 @@ void RewriteObjC::SynthesizeObjCInternalStruct(ObjCInterfaceDecl *CDecl,
}
// Mark this struct as having been generated.
if (!ObjCSynthesizedStructs.insert(CDecl))
- assert(false && "struct already synthesize- SynthesizeObjCInternalStruct");
+ llvm_unreachable("struct already synthesize- SynthesizeObjCInternalStruct");
}
// RewriteObjCMethodsMetaData - Rewrite methods metadata for instance or
@@ -3655,7 +3655,7 @@ RewriteObjCProtocolMetaData(ObjCProtocolDecl *PDecl, StringRef prefix,
// Mark this protocol as having been generated.
if (!ObjCSynthesizedProtocols.insert(PDecl))
- assert(false && "protocol already synthesized");
+ llvm_unreachable("protocol already synthesized");
}
@@ -5048,7 +5048,7 @@ void RewriteObjC::RewriteBlockPointerDecl(NamedDecl *ND) {
else if (FieldDecl *FD = dyn_cast<FieldDecl>(ND))
DeclT = FD->getType();
else
- assert(0 && "RewriteBlockPointerDecl(): Decl type not yet handled");
+ llvm_unreachable("RewriteBlockPointerDecl(): Decl type not yet handled");
const char *startBuf = SM->getCharacterData(DeclLoc);
const char *endBuf = startBuf;
@@ -5966,7 +5966,7 @@ void RewriteObjC::HandleDeclInMainFile(Decl *D) {
else if (ObjCCategoryImplDecl *CI = dyn_cast<ObjCCategoryImplDecl>(D))
CategoryImplementation.push_back(CI);
else if (isa<ObjCClassDecl>(D))
- assert(false && "RewriteObjC::HandleDeclInMainFile - ObjCClassDecl");
+ llvm_unreachable("RewriteObjC::HandleDeclInMainFile - ObjCClassDecl");
else if (VarDecl *VD = dyn_cast<VarDecl>(D)) {
RewriteObjCQualifiedInterfaceTypes(VD);
if (isTopLevelBlockPointerType(VD->getType()))
OpenPOWER on IntegriCloud