Index: include/clang/Basic/Attr.td =================================================================== --- include/clang/Basic/Attr.td +++ include/clang/Basic/Attr.td @@ -2048,17 +2048,15 @@ unsigned SpellingIndex = getSpellingListIndex(); // For "#pragma unroll" and "#pragma nounroll" the string "unroll" or // "nounroll" is already emitted as the pragma name. - if (SpellingIndex == Pragma_nounroll) { - OS << "\n"; + if (SpellingIndex == Pragma_nounroll) return; - } else if (SpellingIndex == Pragma_unroll) { - OS << getValueString(Policy) << "\n"; + OS << getValueString(Policy); return; } assert(SpellingIndex == Pragma_clang_loop && "Unexpected spelling"); - OS << getOptionName(option) << getValueString(Policy) << "\n"; + OS << getOptionName(option) << getValueString(Policy); } // Return a string containing the loop hint argument including the Index: utils/TableGen/ClangAttrEmitter.cpp =================================================================== --- utils/TableGen/ClangAttrEmitter.cpp +++ utils/TableGen/ClangAttrEmitter.cpp @@ -1180,6 +1180,7 @@ if (Variety == "Pragma") { OS << " \";\n"; OS << " printPrettyPragma(OS, Policy);\n"; + OS << " OS << \"\\n\";"; OS << " break;\n"; OS << " }\n"; continue;