summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2014-05-06 03:49:45 +0000
committerAdam Nemet <anemet@apple.com>2014-05-06 03:49:45 +0000
commitf0e7f76933af957d8a497c2c991285a819b67093 (patch)
tree8462458ae34ffce584e9882bb49ef259082587c6
parent40a1b74db686fc3f153dcc01713d1bb51d3c24da (diff)
downloadllvm-f0e7f76933af957d8a497c2c991285a819b67093.tar.gz
llvm-f0e7f76933af957d8a497c2c991285a819b67093.tar.bz2
llvm-f0e7f76933af957d8a497c2c991285a819b67093.tar.xz
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208056 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Makefile.rules8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.rules b/Makefile.rules
index cb4abafd28..d05970c18a 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -1713,8 +1713,14 @@ $(ObjDir)/%GenDFAPacketizer.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
$(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