Skip to content

Commit 83794f6

Browse files
committed
Addressed review comments.
1 parent be076b4 commit 83794f6

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5750,7 +5750,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
57505750
StringRef Footer = D.getIntegrationFooter(Input.getBaseInput());
57515751
if (types::getPreprocessedType(Input.getType()) != types::TY_INVALID &&
57525752
!Args.hasArg(options::OPT_fno_sycl_use_footer) && !Footer.empty()) {
5753-
// Add the -include-internal-footer option to add the integration foote
5753+
// Add the -include-internal-footer option to add the integration footer
57545754
CmdArgs.push_back("-include-internal-footer");
57555755
CmdArgs.push_back(Args.MakeArgString(Footer));
57565756
// When creating dependency information, filter out the generated

clang/lib/Frontend/PrintPreprocessedOutput.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,26 +265,22 @@ void PrintPPOutputPPCallbacks::WriteFooterContent(StringRef CodeFooter) {
265265
*OS << '\n';
266266
}
267267

268-
static bool is_separator(char value) {
269-
if (value == '\\')
270-
return true;
271-
return false;
272-
}
268+
static bool is_separator(char value) { return value == '\\'; }
273269

274270
void PrintPPOutputPPCallbacks::WriteLineInfo(unsigned LineNo,
275271
const char *Extra,
276272
unsigned ExtraLen) {
277273
startNewLineIfNeeded();
278274

279-
// Emit #line directives or GNU line markers depending on what mode we're in.
280275
StringRef CurFilenameWithNoLeaningDotSlash =
281-
llvm::sys::path::remove_leading_dotbackslah(CurFilename.str());
276+
llvm::sys::path::remove_leading_dotbackslash(CurFilename.str());
282277
if ((CurFilenameWithNoLeaningDotSlash ==
283278
PP.getPreprocessorOpts().IncludeFooter) ||
284279
CurFilenameWithNoLeaningDotSlash ==
285280
PP.getPreprocessorOpts().IncludeHeader) {
286281
CurFilename = "<uninit>";
287282
}
283+
// Emit #line directives or GNU line markers depending on what mode we're in.
288284
if (UseLineDirectives) {
289285
*OS << "#line" << ' ' << LineNo << ' ' << '"';
290286
OS->write_escaped(CurFilename);

llvm/include/llvm/Support/Path.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ StringRef remove_leading_dotslash(StringRef path, Style style = Style::native);
205205
///
206206
/// @param path Input path.
207207
/// @result The cleaned-up \a path.
208-
StringRef remove_leading_dotbackslah(StringRef path);
208+
StringRef remove_leading_dotbackslash(StringRef path);
209209

210210
/// In-place remove any './' and optionally '../' components from a path.
211211
///

llvm/lib/Support/Path.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ StringRef remove_leading_dotslash(StringRef Path, Style style) {
711711
return Path;
712712
}
713713

714-
StringRef remove_leading_dotbackslah(StringRef Path) {
714+
StringRef remove_leading_dotbackslash(StringRef Path) {
715715
// Remove leading ".\\".
716716
if (Path.size() > 2 && Path[0] == '.' && Path[1] == '\\')
717717
Path = Path.substr(2);

0 commit comments

Comments
 (0)