MCPcopy Create free account
hub / github.com/decomp/decomp / localIdent

Method localIdent

cmd/ll2go/main.go:474–479  ·  view source on GitHub ↗

localIdent converts the given LLVM IR local identifier to a corresponding Go identifier.

(name string)

Source from the content-addressed store, hash-verified

472// localIdent converts the given LLVM IR local identifier to a corresponding Go
473// identifier.
474func (d *decompiler) localIdent(name string) *ast.Ident {
475 if isID(name) {
476 name = "_" + name
477 }
478 return ident(name)
479}
480
481// isID reports if the given string is an unnamed identifier.
482func isID(s string) bool {

Callers 6

goTypeDefMethod · 0.95
instSelectMethod · 0.95
instCallMethod · 0.95
assignMethod · 0.95
valueMethod · 0.95
termSwitchMethod · 0.95

Calls 2

isIDFunction · 0.85
identFunction · 0.85

Tested by

no test coverage detected