Add support for the basic type "bool".

R=r
DELTA=51  (51 added, 0 deleted, 0 changed)
OCL=18283
CL=18290
This commit is contained in:
Ian Lance Taylor 2008-10-31 16:34:47 -07:00
parent 613a5c8bc6
commit 16fd356679
6 changed files with 51 additions and 0 deletions

View file

@ -162,6 +162,12 @@ func ValueToString(val Value) string {
return "float80";
case StringKind:
return val.(StringValue).Get();
case BoolKind:
if val.(BoolValue).Get() {
return "true"
} else {
return "false"
}
case PtrKind:
v := val.(PtrValue);
return TypeToString(typ, false) + "(" + integer(int64(v.Get())) + ")";