[clang-tools-extra] 481fd41 - [modularize] Use SmallString::operator std::string (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 15 21:26:00 PST 2024


Author: Kazu Hirata
Date: 2024-01-15T21:25:51-08:00
New Revision: 481fd41aaa343e2ee2c86c2444fbc2e5ad1f3831

URL: https://github.com/llvm/llvm-project/commit/481fd41aaa343e2ee2c86c2444fbc2e5ad1f3831
DIFF: https://github.com/llvm/llvm-project/commit/481fd41aaa343e2ee2c86c2444fbc2e5ad1f3831.diff

LOG: [modularize] Use SmallString::operator std::string (NFC)

Added: 
    

Modified: 
    clang-tools-extra/modularize/ModularizeUtilities.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/modularize/ModularizeUtilities.cpp b/clang-tools-extra/modularize/ModularizeUtilities.cpp
index 25de9c9dd05ac9..d25bb09b8cad5b 100644
--- a/clang-tools-extra/modularize/ModularizeUtilities.cpp
+++ b/clang-tools-extra/modularize/ModularizeUtilities.cpp
@@ -195,7 +195,7 @@ std::error_code ModularizeUtilities::loadSingleHeaderListsAndDependencies(
     // Get canonical form.
     HeaderFileName = getCanonicalPath(HeaderFileName);
     // Save the resulting header file path and dependencies.
-    HeaderFileNames.push_back(std::string(HeaderFileName.str()));
+    HeaderFileNames.push_back(std::string(HeaderFileName));
     Dependencies[HeaderFileName.str()] = Dependents;
   }
   return std::error_code();
@@ -248,7 +248,7 @@ std::error_code ModularizeUtilities::loadProblemHeaderList(
     // Get canonical form.
     HeaderFileName = getCanonicalPath(HeaderFileName);
     // Save the resulting header file path.
-    ProblemFileNames.push_back(std::string(HeaderFileName.str()));
+    ProblemFileNames.push_back(std::string(HeaderFileName));
   }
   return std::error_code();
 }


        


More information about the cfe-commits mailing list