diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 3469676..428a4b8 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -4061,11 +4061,7 @@ namespace { return false; std::string BuiltinNameStr = BI.getName(BuiltinID); StringRef BuiltinName = BuiltinNameStr; - if (BuiltinName.starts_with("__builtin_") && - Name == BuiltinName.slice(strlen("__builtin_"), StringRef::npos)) { - return true; - } - return false; + return BuiltinName.consume_front("__builtin_") && Name == BuiltinName; } bool VisitStmt(const Stmt *S) { |