[llvm] r370510 - [IFS][NFC] llvm-ifs: Fixing build errors for bots using GCC.
Puyan Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 12:54:46 PDT 2019
Author: zer0
Date: Fri Aug 30 12:54:46 2019
New Revision: 370510
URL: http://llvm.org/viewvc/llvm-project?rev=370510&view=rev
Log:
[IFS][NFC] llvm-ifs: Fixing build errors for bots using GCC.
gcc produces the error:
error: specialization of
‘template<class T, class Enable> struct llvm::yaml::ScalarTraits’ in
different namespace
For all specializations outside of llvm::yaml. So I added llvm::yaml to these
specializations to fix the errors on the bots building with gcc (/usr/bin/c++).
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=370510&r1=370509&r2=370510&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ifs/llvm-ifs.cpp (original)
+++ llvm/trunk/tools/llvm-ifs/llvm-ifs.cpp Fri Aug 30 12:54:46 2019
@@ -88,7 +88,7 @@ struct IFSSymbol {
namespace llvm {
namespace yaml {
/// YAML traits for IFSSymbolType.
-template <> struct ScalarEnumerationTraits<IFSSymbolType> {
+template <> struct llvm::yaml::ScalarEnumerationTraits<IFSSymbolType> {
static void enumeration(IO &IO, IFSSymbolType &SymbolType) {
IO.enumCase(SymbolType, "NoType", IFSSymbolType::NoType);
IO.enumCase(SymbolType, "Func", IFSSymbolType::Func);
@@ -100,7 +100,7 @@ template <> struct ScalarEnumerationTrai
}
};
-template <> struct ScalarTraits<VersionTuple> {
+template <> struct llvm::yaml::ScalarTraits<VersionTuple> {
static void output(const VersionTuple &Value, void *,
llvm::raw_ostream &Out) {
Out << Value.getAsString();
@@ -122,7 +122,7 @@ template <> struct ScalarTraits<VersionT
};
/// YAML traits for IFSSymbol.
-template <> struct MappingTraits<IFSSymbol> {
+template <> struct llvm::yaml::MappingTraits<IFSSymbol> {
static void mapping(IO &IO, IFSSymbol &Symbol) {
IO.mapRequired("Type", Symbol.Type);
// The need for symbol size depends on the symbol type.
@@ -141,7 +141,7 @@ template <> struct MappingTraits<IFSSymb
};
/// YAML traits for set of IFSSymbols.
-template <> struct CustomMappingTraits<std::set<IFSSymbol>> {
+template <> struct llvm::yaml::CustomMappingTraits<std::set<IFSSymbol>> {
static void inputOne(IO &IO, StringRef Key, std::set<IFSSymbol> &Set) {
std::string Name = Key.str();
IFSSymbol Sym(Name);
@@ -184,7 +184,7 @@ public:
namespace llvm {
namespace yaml {
/// YAML traits for IFSStub objects.
-template <> struct MappingTraits<IFSStub> {
+template <> struct llvm::yaml::MappingTraits<IFSStub> {
static void mapping(IO &IO, IFSStub &Stub) {
if (!IO.mapTag("!experimental-ifs-v1", true))
IO.setError("Not a .ifs YAML file.");
More information about the llvm-commits
mailing list