Files
Alessandro Di Federico a023bfa7f5 Introduce ABI handling
2021-10-18 20:44:58 +02:00

38 lines
712 B
C++

#pragma once
//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
#include "llvm/ADT/StringRef.h"
#include "revng/Model/TupleTree.h"
#include "revng/Support/Debug.h"
#include "revng/Support/YAMLTraits.h"
namespace model::abi {
enum Values { Invalid, SystemV_x86_64, Count };
inline llvm::StringRef getName(Values V) {
switch (V) {
case Invalid:
return "Invalid";
case SystemV_x86_64:
return "SystemV_x86_64";
default:
revng_abort();
}
revng_abort();
}
} // namespace model::abi
namespace llvm::yaml {
template<>
struct ScalarEnumerationTraits<model::abi::Values>
: public NamedEnumScalarTraits<model::abi::Values> {};
} // namespace llvm::yaml