shithub: scc

Download patch

ref: 409d9be87d504193aeb05a217f691ab1590e4d1a
parent: 09c9fde65f9ee0cd014980450c3065c607c84e28
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Apr 4 12:46:26 EDT 2016

[cc2] Remove sigil function from qbe

This function is not going to be used because
we know in every case what is the sigil we have
to use.

--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
@@ -6,28 +6,6 @@
 #include "../../cc2.h"
 #include "../../../inc/sizes.h"
 
-/*
- * : is for user-defined Aggregate Types
- * $ is for globals (represented by a pointer)
- * % is for function-scope temporaries
- * @ is for block labels
- */
-static char
-sigil(Symbol *sym)
-{
-	switch (sym->kind) {
-	case EXTRN:
-	case GLOB:
-	case PRIVAT:
-	case LOCAL:
-		return '$';
-	case AUTO:
-	case REG:
-		return '%';
-	default:
-		abort();
-	}
-}
 
 static void
 size2asm(Type *tp)