[llvm] 32ce076 - [CodeGen] Use StringRef::contains (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 4 20:59:06 PDT 2022
Author: Kazu Hirata
Date: 2022-06-04T20:58:58-07:00
New Revision: 32ce076d780b914d048fc90dfdc49c950483e307
URL: https://github.com/llvm/llvm-project/commit/32ce076d780b914d048fc90dfdc49c950483e307
DIFF: https://github.com/llvm/llvm-project/commit/32ce076d780b914d048fc90dfdc49c950483e307.diff
LOG: [CodeGen] Use StringRef::contains (NFC)
Added:
Modified:
llvm/lib/CodeGen/JMCInstrumenter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/JMCInstrumenter.cpp b/llvm/lib/CodeGen/JMCInstrumenter.cpp
index 7df7b0e855c7a..23220872b5321 100644
--- a/llvm/lib/CodeGen/JMCInstrumenter.cpp
+++ b/llvm/lib/CodeGen/JMCInstrumenter.cpp
@@ -70,8 +70,8 @@ std::string getFlagName(DISubprogram &SP, bool UseX86FastCall) {
// relative posix path: posix
sys::path::Style PathStyle =
has_root_name(SP.getDirectory(), sys::path::Style::windows_backslash) ||
- SP.getDirectory().find("\\") != StringRef::npos ||
- SP.getFilename().find("\\") != StringRef::npos
+ SP.getDirectory().contains("\\") ||
+ SP.getFilename().contains("\\")
? sys::path::Style::windows_backslash
: sys::path::Style::posix;
// Best effort path normalization. This is to guarantee an unique flag symbol
More information about the llvm-commits
mailing list