[llvm] r370504 - Fix compilation warnings. NFC.

Michael Liao via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 12:23:29 PDT 2019


Author: hliao
Date: Fri Aug 30 12:23:28 2019
New Revision: 370504

URL: http://llvm.org/viewvc/llvm-project?rev=370504&view=rev
Log:
Fix compilation warnings. NFC.

Modified:
    llvm/trunk/tools/llvm-ifs/llvm-ifs.cpp

Modified: llvm/trunk/tools/llvm-ifs/llvm-ifs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ifs/llvm-ifs.cpp?rev=370504&r1=370503&r2=370504&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ifs/llvm-ifs.cpp (original)
+++ llvm/trunk/tools/llvm-ifs/llvm-ifs.cpp Fri Aug 30 12:23:28 2019
@@ -35,7 +35,7 @@ using namespace llvm::MachO;
 
 namespace {
 const VersionTuple IFSVersionCurrent(1, 2);
-};
+}
 
 static cl::opt<std::string> Action("action", cl::desc("<llvm-ifs action>"),
                                    cl::value_desc("write-ifs | write-bin"),
@@ -72,6 +72,7 @@ std::string getTypeName(IFSSymbolType Ty
   case IFSSymbolType::Unknown:
     return "Unknown";
   }
+  llvm_unreachable("Unexpected ifs symbol type.");
 }
 
 struct IFSSymbol {
@@ -84,6 +85,8 @@ struct IFSSymbol {
   bool operator<(const IFSSymbol &RHS) const { return Name < RHS.Name; }
 };
 
+namespace llvm {
+namespace yaml {
 /// YAML traits for IFSSymbolType.
 template <> struct ScalarEnumerationTraits<IFSSymbolType> {
   static void enumeration(IO &IO, IFSSymbolType &SymbolType) {
@@ -151,6 +154,8 @@ template <> struct CustomMappingTraits<s
       IO.mapRequired(Sym.Name.c_str(), const_cast<IFSSymbol &>(Sym));
   }
 };
+} // End yaml namespace
+} // End llvm namespace
 
 // A cumulative representation of ELF stubs.
 // Both textual and binary stubs will read into and write from this object.
@@ -176,6 +181,8 @@ public:
         Symbols(std::move(Stub.Symbols)) {}
 };
 
+namespace llvm {
+namespace yaml {
 /// YAML traits for IFSStub objects.
 template <> struct MappingTraits<IFSStub> {
   static void mapping(IO &IO, IFSStub &Stub) {
@@ -189,6 +196,8 @@ template <> struct MappingTraits<IFSStub
     IO.mapRequired("Symbols", Stub.Symbols);
   }
 };
+} // End yaml namespace
+} // End llvm namespace
 
 static Expected<std::unique_ptr<IFSStub>> readInputFile(StringRef FilePath) {
   // Read in file.




More information about the llvm-commits mailing list