[llvm] r177682 - Add TableGen ctags(1) emitter and helper script.

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Mar 21 18:15:16 PDT 2013


On Mar 21, 2013, at 4:40 PM, Sean Silva <silvas at purdue.edu> wrote:

> Author: silvas
> Date: Thu Mar 21 18:40:38 2013
> New Revision: 177682
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=177682&view=rev
> Log:
> Add TableGen ctags(1) emitter and helper script.

Very nice!

> +SMLoc CTagsEmitter::locate(const Record *R) {
> +  ArrayRef<SMLoc> Locs = R->getLoc();
> +  if (Locs.empty()) {
> +    SMLoc NullLoc;
> +    return NullLoc;
> +  }
> +  return Locs.front();
> +}

Kevin, did you try emitting tags for all the parts of the Locs array? It can be hard to predict which part of a multiclass instantiation contains the bits you're looking for.

/jakob





More information about the llvm-commits mailing list