[llvm-commits] [llvm] r121166 - /llvm/trunk/utils/TableGen/FastISelEmitter.cpp
Jim Grosbach
grosbach at apple.com
Tue Dec 7 15:08:50 PST 2010
On Dec 7, 2010, at 2:44 PM, Chris Lattner wrote:
>>>
>>> Ok, do you have the record for the Pat pattern? If you use:
>>> throw TGError(TheDef->getLoc(), "message")
>>> then you'll get a caret pointing to the duplicate def in the error message.
>>
>>
>> I couldn't find the Record for the Pat. That's definitely what I really wanted. We have have the PatternToMatch entry, and from that we get the source pattern TreePatternNode. Is there a way to go from either of those to the corresponding Record?
>
> No, there isn't. It seems reasonable to add a Record* to the PatternToMatch class, and pass in the record to the PatternToMatch ctor.
Sounds good to me. Done in r121196. Thanks!
-Jim
More information about the llvm-commits
mailing list