compiler/protogen: use protoreflect.SourcePath

Change-Id: I3770d8952e12bb12d8bdc326635008843cd8a6af
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/186000
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/compiler/protogen/protogen.go b/compiler/protogen/protogen.go
index 6f6be12..9a561f8 100644
--- a/compiler/protogen/protogen.go
+++ b/compiler/protogen/protogen.go
@@ -1134,12 +1134,12 @@
 // for details.
 type Location struct {
 	SourceFile string
-	Path       []int32
+	Path       protoreflect.SourcePath
 }
 
 // appendPath add elements to a Location's path, returning a new Location.
 func (loc Location) appendPath(a ...int32) Location {
-	var n []int32
+	var n protoreflect.SourcePath
 	n = append(n, loc.Path...)
 	n = append(n, a...)
 	return Location{