Skip to content

Commit

Permalink
Fix compilation warnings. NFC.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370504 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
darkbuck committed Aug 30, 2019
1 parent 173f4de commit 338cb73
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tools/llvm-ifs/llvm-ifs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -72,6 +72,7 @@ std::string getTypeName(IFSSymbolType Type) {
case IFSSymbolType::Unknown:
return "Unknown";
}
llvm_unreachable("Unexpected ifs symbol type.");
}

struct IFSSymbol {
Expand All @@ -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) {
Expand Down Expand Up @@ -151,6 +154,8 @@ template <> struct CustomMappingTraits<std::set<IFSSymbol>> {
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.
Expand All @@ -176,6 +181,8 @@ class IFSStub {
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) {
Expand All @@ -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.
Expand Down

0 comments on commit 338cb73

Please sign in to comment.