[llvm-commits] [llvm] r121166 - /llvm/trunk/utils/TableGen/FastISelEmitter.cpp
Chris Lattner
clattner at apple.com
Tue Dec 7 14:44:51 PST 2010
>>
>> 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.
-Chris
More information about the llvm-commits
mailing list