[PATCH] D155684: [XCOFF] Write source language ID and CPU version ID into C_FILE symbol.
Stephen Peckham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 10:27:56 PDT 2023
stephenpeckham added inline comments.
================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:1115
+ LangID = XCOFF::TB_CPLUSPLUS;
+ else if (FileName.ends_with_insensitive(".c"))
+ LangID = XCOFF::TB_C;
----------------
Shouldn't this be "endswith" instead of "ends_with_insensitive"? Otherwise, .C looks like TB_C. Maybe you should check for .c first, then default to TB_CPLUSPLUS. (If you want checks for other languages, such as Fortran, you could add them.).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155684/new/
https://reviews.llvm.org/D155684
More information about the llvm-commits
mailing list