[llvm] b8d0cba - [TextAPI] Apply NFC code fixups (#88639)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 14 09:23:45 PDT 2024
Author: Cyndy Ishida
Date: 2024-04-14T09:23:42-07:00
New Revision: b8d0cba14bcfc5c1c2f7a878ad9eaa12b6a590b6
URL: https://github.com/llvm/llvm-project/commit/b8d0cba14bcfc5c1c2f7a878ad9eaa12b6a590b6
DIFF: https://github.com/llvm/llvm-project/commit/b8d0cba14bcfc5c1c2f7a878ad9eaa12b6a590b6.diff
LOG: [TextAPI] Apply NFC code fixups (#88639)
* Remove unnecessary cast
* Annotate `#endif`
Added:
Modified:
llvm/include/llvm/TextAPI/Utils.h
llvm/lib/TextAPI/BinaryReader/DylibReader.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/TextAPI/Utils.h b/llvm/include/llvm/TextAPI/Utils.h
index 319e0abce25b03..ebfe88984f8034 100644
--- a/llvm/include/llvm/TextAPI/Utils.h
+++ b/llvm/include/llvm/TextAPI/Utils.h
@@ -21,7 +21,7 @@
#if !defined(PATH_MAX)
#define PATH_MAX 1024
-#endif
+#endif // !defined(PATH_MAX)
#define MACCATALYST_PREFIX_PATH "/System/iOSSupport"
#define DRIVERKIT_PREFIX_PATH "/System/DriverKit"
diff --git a/llvm/lib/TextAPI/BinaryReader/DylibReader.cpp b/llvm/lib/TextAPI/BinaryReader/DylibReader.cpp
index f92a2d19a63fc2..ec0271f774ecc5 100644
--- a/llvm/lib/TextAPI/BinaryReader/DylibReader.cpp
+++ b/llvm/lib/TextAPI/BinaryReader/DylibReader.cpp
@@ -484,7 +484,7 @@ accumulateLocs(MachOObjectFile &Obj,
auto Sym = parseSymbol(Name);
if (!File.empty() && Line != 0)
- LocMap.insert({Sym.Name.str(), RecordLoc(File, Line)});
+ LocMap.insert({Sym.Name, RecordLoc(File, Line)});
}
return LocMap;
More information about the llvm-commits
mailing list