summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPuyan Lotfi <puyan@puyan.org>2019-08-30 19:54:46 +0000
committerPuyan Lotfi <puyan@puyan.org>2019-08-30 19:54:46 +0000
commit979e7cda8048ab802e46f8a7ff22f98d4f36f606 (patch)
tree9ea764434d25a34fe32ea8e93cfe8c6d2e212c83
parentfecfc5920aeb163822ca0213206a34473109a86d (diff)
downloadbcm5719-llvm-979e7cda8048ab802e46f8a7ff22f98d4f36f606.tar.gz
bcm5719-llvm-979e7cda8048ab802e46f8a7ff22f98d4f36f606.zip
[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++). llvm-svn: 370510
-rw-r--r--llvm/tools/llvm-ifs/llvm-ifs.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/tools/llvm-ifs/llvm-ifs.cpp b/llvm/tools/llvm-ifs/llvm-ifs.cpp
index 3377985ae4a..41f504a13ea 100644
--- a/llvm/tools/llvm-ifs/llvm-ifs.cpp
+++ b/llvm/tools/llvm-ifs/llvm-ifs.cpp
@@ -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 ScalarEnumerationTraits<IFSSymbolType> {
}
};
-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<VersionTuple> {
};
/// 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<IFSSymbol> {
};
/// 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.");
OpenPOWER on IntegriCloud