[Tablegen][DAG]: Fix build breakage when LLVM_ENABLE_DAGISEL_COV=1
authorAditya Nandakumar <aditya_nandakumar@apple.com>
Mon, 4 Feb 2019 21:06:24 +0000 (21:06 +0000)
committerAditya Nandakumar <aditya_nandakumar@apple.com>
Mon, 4 Feb 2019 21:06:24 +0000 (21:06 +0000)
LLVM_ENABLE_DAGISEL_COV can be used to instrument DAGISel tablegen
selection code to show which patterns along with Complex patterns were
used when selecting instructions. Unfortunately this is turned off by
default and was broken but never tested.
This required a simple fix (missing new line) to get it to build again.

llvm-svn: 353091

llvm/utils/TableGen/DAGISelMatcherEmitter.cpp

index bcfb2b7..e83e773 100644 (file)
@@ -258,7 +258,7 @@ void MatcherTableEmitter::EmitPatternMatchTable(raw_ostream &OS) {
 
   OS << "\n};";
   OS << "\nreturn StringRef(PATTERN_MATCH_TABLE[Index]);";
-  OS << "\n}";
+  OS << "\n}\n";
   EndEmitFunction(OS);
 
   BeginEmitFunction(OS, "StringRef", "getIncludePathForIndex(unsigned Index)",
@@ -272,7 +272,7 @@ void MatcherTableEmitter::EmitPatternMatchTable(raw_ostream &OS) {
 
   OS << "\n};";
   OS << "\nreturn StringRef(INCLUDE_PATH_TABLE[Index]);";
-  OS << "\n}";
+  OS << "\n}\n";
   EndEmitFunction(OS);
 }