[llvm] r208056 - [Build] Add rule to generate fully-expanded .td file

James Molloy mankeyrabbit at gmail.com
Mon May 5 23:16:12 PDT 2014


Hi Adam,

Would it be possible to add a CMake equivalent? I also think this is pretty useful.

Cheers,

James

-----Original Message-----
From: "Adam Nemet" <anemet at apple.com>
Sent: ‎06/‎05/‎2014 05:58
To: "llvm-commits at cs.uiuc.edu" <llvm-commits at cs.uiuc.edu>
Subject: [llvm] r208056 - [Build] Add rule to generate fully-expanded .td file

Author: anemet
Date: Mon May  5 22:49:45 2014
New Revision: 208056

URL: http://llvm.org/viewvc/llvm-project?rev=208056&view=rev
Log:
[Build] Add rule to generate fully-expanded .td file

I found it useful in the past and now again to have a version of the .td file
where all the records are expanded.  This adds a makefile rule to generate
this on demand.

Modified:
    llvm/trunk/Makefile.rules

Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=208056&r1=208055&r2=208056&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Mon May  5 22:49:45 2014
@@ -1713,8 +1713,14 @@ $(ObjDir)/%GenDFAPacketizer.inc.tmp : %.
 	$(Echo) "Building $(<F) DFA packetizer tables with tblgen"
 	$(Verb) $(LLVMTableGen) -gen-dfa-packetizer -o $(call SYSPATH, $@) $<
 
+# Dump all the records to <target>.td.expanded.  This is useful for debugging.
+$(TARGET:%=%.td.expanded): \
+%.td.expanded : %.td $(LLVM_TBLGEN)
+	$(Echo) "Building a fully expanded version of $(<F)"
+	$(Verb) $(LLVMTableGen) -o $(call SYSPATH, $@) $<
+
 clean-local::
-	-$(Verb) $(RM) -f $(INCFiles)
+	-$(Verb) $(RM) -f $(INCFiles) $(TARGET).td.expanded
 
 endif # TARGET
 


_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140506/f6b787fd/attachment.html>


More information about the llvm-commits mailing list