(Corresponding x/tools/go/gcimporter change is https://go-review.googlesource.com/#/c/20827/)
Change-Id: I64e7fee2e273d387f1c51b87986294489978d250
Reviewed-on: https://go-review.googlesource.com/20828
Reviewed-by: Robert Griesemer <gri@golang.org>
complexTag
stringTag
nilTag
+ unknownTag // not used by gc (only appears in packages with errors)
)
// Debugging support.
-fractionTag: "fraction",
-complexTag: "complex",
-stringTag: "string",
+ -nilTag: "nil",
+ -unknownTag: "unknown",
}
// untype returns the "pseudo" untyped type for a Ctype (import/export use only).
// package unsafe
Types[TUNSAFEPTR],
+ // invalid type (package contains errors)
+ Types[Txxx],
+
// any type, for builtin export data
Types[TANY],
}
case stringTag:
x.U = p.string()
+ case unknownTag:
+ Fatalf("importer: unknown constant (importing package with errors)")
+
case nilTag:
x.U = new(NilVal)
// package unsafe
types.Typ[types.UnsafePointer],
- // any type, for builtin export data
+ // invalid type
+ types.Typ[types.Invalid], // only appears in packages with errors
+
// TODO(mdempsky): Provide an actual Type value to represent "any"?
+ // (Why exactly does gc emit the "any" type?)
types.Typ[types.Invalid],
}