]> granicus.if.org Git - clang/commitdiff
ASTContext.cpp: Fix a warning in r190684. [-Wcovered-switch-default]
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 13 Sep 2013 17:12:09 +0000 (17:12 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 13 Sep 2013 17:12:09 +0000 (17:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190705 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp

index 0783f291610fe39b01267249a7b72d6aedd3fcc4..05d83547939f6459d9e83f69e9e371c64850a187 100644 (file)
@@ -698,7 +698,6 @@ static const LangAS::Map *getAddressSpaceMap(const TargetInfo &T,
 static bool isAddrSpaceMapManglingEnabled(const TargetInfo &TI,
                                           const LangOptions &LangOpts) {
   switch (LangOpts.getAddressSpaceMapMangling()) {
-  default: return false;
   case LangOptions::ASMM_Target:
     return TI.useAddressSpaceMapMangling();
   case LangOptions::ASMM_On:
@@ -706,6 +705,8 @@ static bool isAddrSpaceMapManglingEnabled(const TargetInfo &TI,
   case LangOptions::ASMM_Off:
     return false;
   }
+  llvm_unreachable("getAddressSpaceMapMangling() doesn't cover anything.");
+  return false;
 }
 
 ASTContext::ASTContext(LangOptions& LOpts, SourceManager &SM,