Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

llvm-svn: 304645
This commit is contained in:
Galina Kistanova 2017-06-03 06:27:16 +00:00
parent a65d5785d8
commit e37ad5a79e
3 changed files with 4 additions and 0 deletions

View File

@ -1727,6 +1727,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
diag::warn_module_config_mismatch)
<< ModuleFileName;
// Fall through to error out.
LLVM_FALLTHROUGH;
case ASTReader::VersionMismatch:
case ASTReader::HadErrors:
ModuleLoader::HadFatalFailure = true;

View File

@ -221,6 +221,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
case llvm::Triple::Win32:
if (triple.getEnvironment() != llvm::Triple::Cygnus)
break;
LLVM_FALLTHROUGH;
default:
// FIXME: temporary hack: hard-coded paths.
AddPath("/usr/local/include", System, false);
@ -343,6 +344,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
AddPath(BaseSDKPath + "/target/include", System, false);
if (triple.isPS4CPU())
AddPath(BaseSDKPath + "/target/include_common", System, false);
LLVM_FALLTHROUGH;
}
default:
AddPath("/usr/include", ExternCSystem, false);

View File

@ -125,6 +125,7 @@ SerializedDiagnosticReader::readMetaBlock(llvm::BitstreamCursor &Stream) {
case Cursor::BlockBegin:
if (Stream.SkipBlock())
return SDError::MalformedMetadataBlock;
LLVM_FALLTHROUGH;
case Cursor::BlockEnd:
if (!VersionChecked)
return SDError::MissingVersion;