#include "source/name_mapper.h"
#include <algorithm>
#include <cassert>
#include <iterator>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include "source/binary.h"
#include "source/latest_version_spirv_header.h"
#include "source/parsed_operand.h"
#include "spirv-tools/libspirv.h"
namespace spvtools {
namespace {
std::string to_string(uint32_t id) { … }
}
NameMapper GetTrivialNameMapper() { … }
FriendlyNameMapper::FriendlyNameMapper(const spv_const_context context,
const uint32_t* code,
const size_t wordCount)
: … { … }
std::string FriendlyNameMapper::NameForId(uint32_t id) { … }
std::string FriendlyNameMapper::Sanitize(const std::string& suggested_name) { … }
void FriendlyNameMapper::SaveName(uint32_t id,
const std::string& suggested_name) { … }
void FriendlyNameMapper::SaveBuiltInName(uint32_t target_id,
uint32_t built_in) { … }
spv_result_t FriendlyNameMapper::ParseInstruction(
const spv_parsed_instruction_t& inst) { … }
std::string FriendlyNameMapper::NameForEnumOperand(spv_operand_type_t type,
uint32_t word) { … }
}