mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
38 lines
712 B
C++
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
|