r66870 missed this out.
[oota-llvm.git] / Makefile.rules
index b7992fdde423c0f75bb4daa6dea9e51f22a3950a..351a3450601bf7c6f3c558ea3fc239907f98e8aa 100644 (file)
@@ -1358,6 +1358,10 @@ ifdef LLVMC_BUILD_AUTOGENERATED_INC
 TABLEGEN_INC_FILES_COMMON = 1
 endif
 
+ifdef CLANG_BUILD_DIAGNOSTICS_INC
+TABLEGEN_INC_FILES_COMMON = 1
+endif
+
 ifdef TABLEGEN_INC_FILES_COMMON
 
 INCFiles := $(filter %.inc,$(BUILT_SOURCES))
@@ -1472,6 +1476,14 @@ $(ObjDir)/AutoGenerated.inc.tmp: $(LLVMCPluginSrc) $(ObjDir)/.dir \
 
 endif # LLVMC_BUILD_AUTOGENERATED_INC
 
+ifdef CLANG_BUILD_DIAGNOSTICS_INC
+
+$(ObjDir)/Diagnostic%Kinds.inc.tmp : Diagnostic.td Diagnostic%Kinds.td $(TBLGEN)
+       $(Echo) "Building Clang $(patsubst Diagnostic%Kinds.inc.tmp,%,$(@F)) diagnostic tables with tblgen"
+       $(Verb) $(MKDIR) $(@D)
+       $(Verb) $(TableGen) -gen-clang-diags-defs -clang-component=$(patsubst Diagnostic%Kinds.inc.tmp,%,$(@F)) -o $(call SYSPATH, $@) $<
+
+endif
 
 ###############################################################################
 # OTHER RULES: Other rules needed