Remove legacy utility functions (#2530)
These are not called/referenced by anything, and are marked as being
unused. They were brought to my attention by a coverity based bug
report.
Fixes #2537
diff --git a/source/val/validate.cpp b/source/val/validate.cpp
index 52009fc..9e8d7fb 100644
--- a/source/val/validate.cpp
+++ b/source/val/validate.cpp
@@ -110,48 +110,6 @@
return SPV_SUCCESS;
}
-void printDot(const ValidationState_t& _, const BasicBlock& other) {
- std::string block_string;
- if (other.successors()->empty()) {
- block_string += "end ";
- } else {
- for (auto block : *other.successors()) {
- block_string += _.getIdName(block->id()) + " ";
- }
- }
- printf("%10s -> {%s\b}\n", _.getIdName(other.id()).c_str(),
- block_string.c_str());
-}
-
-void PrintBlocks(ValidationState_t& _, Function func) {
- assert(func.first_block());
-
- printf("%10s -> %s\n", _.getIdName(func.id()).c_str(),
- _.getIdName(func.first_block()->id()).c_str());
- for (const auto& block : func.ordered_blocks()) {
- printDot(_, *block);
- }
-}
-
-#ifdef __clang__
-#define UNUSED(func) [[gnu::unused]] func
-#elif defined(__GNUC__)
-#define UNUSED(func) \
- func __attribute__((unused)); \
- func
-#elif defined(_MSC_VER)
-#define UNUSED(func) func
-#endif
-
-UNUSED(void PrintDotGraph(ValidationState_t& _, Function func)) {
- if (func.first_block()) {
- std::string func_name(_.getIdName(func.id()));
- printf("digraph %s {\n", func_name.c_str());
- PrintBlocks(_, func);
- printf("}\n");
- }
-}
-
spv_result_t ValidateForwardDecls(ValidationState_t& _) {
if (_.unresolved_forward_id_count() == 0) return SPV_SUCCESS;