From 2dc45bf392fafe96b1c6544d6f15d8a01b2c2df4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Mon, 3 Feb 2020 09:45:03 +0200 Subject: [PATCH] [OpenMP] Fix GCC warnings. NFC. Remove an extra semicolon, and add llvm_unreachable to avoid warnings about control reaching the end of a non-void function. --- llvm/lib/Frontend/OpenMP/OMPContext.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Frontend/OpenMP/OMPContext.cpp b/llvm/lib/Frontend/OpenMP/OMPContext.cpp index ad0f1ab..312589a 100644 --- a/llvm/lib/Frontend/OpenMP/OMPContext.cpp +++ b/llvm/lib/Frontend/OpenMP/OMPContext.cpp @@ -241,7 +241,7 @@ static APInt getVariantMatchScore(const VariantMatchInfo &VMI, LLVM_DEBUG(dbgs() << "[" << DEBUG_TYPE << "] Variant has a score of " << Score << "\n"); return Score; -}; +} int llvm::omp::getBestVariantMatchForContext( const SmallVectorImpl &VMIs, const OMPContext &Ctx) { @@ -293,6 +293,7 @@ llvm::omp::getOpenMPContextTraitSetForProperty(TraitProperty Property) { return TraitSet::TraitSetEnum; #include "llvm/Frontend/OpenMP/OMPKinds.def" } + llvm_unreachable("Unknown trait set!"); } StringRef llvm::omp::getOpenMPContextTraitSetName(TraitSet Kind) { switch (Kind) { @@ -319,6 +320,7 @@ llvm::omp::getOpenMPContextTraitSelectorForProperty(TraitProperty Property) { return TraitSelector::TraitSelectorEnum; #include "llvm/Frontend/OpenMP/OMPKinds.def" } + llvm_unreachable("Unknown trait set!"); } StringRef llvm::omp::getOpenMPContextTraitSelectorName(TraitSelector Kind) { switch (Kind) { -- 2.7.4