[llvm] [Arm64EC] Copy import descriptors to the EC Map (PR #84834)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 14:14:24 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 9a9aa41dea83039154601082b1aa2c56e35a5a17 98863a86eb89a565baf4899c1cdb75d31ae0905a -- llvm/include/llvm/Object/COFFImportFile.h llvm/lib/Object/ArchiveWriter.cpp llvm/lib/Object/COFFImportFile.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Object/COFFImportFile.h b/llvm/include/llvm/Object/COFFImportFile.h
index 369fd5b870..7268faa87e 100644
--- a/llvm/include/llvm/Object/COFFImportFile.h
+++ b/llvm/include/llvm/Object/COFFImportFile.h
@@ -27,7 +27,8 @@ namespace llvm {
namespace object {
constexpr std::string_view ImportDescriptorPrefix = "__IMPORT_DESCRIPTOR_";
-constexpr std::string_view NullImportDescriptorSymbolName = "__NULL_IMPORT_DESCRIPTOR";
+constexpr std::string_view NullImportDescriptorSymbolName =
+ "__NULL_IMPORT_DESCRIPTOR";
constexpr std::string_view NullThunkDataPrefix = "\x7f";
constexpr std::string_view NullThunkDataSuffix = "_NULL_THUNK_DATA";
diff --git a/llvm/lib/Object/ArchiveWriter.cpp b/llvm/lib/Object/ArchiveWriter.cpp
index fd50779ca9..1f1a1b1325 100644
--- a/llvm/lib/Object/ArchiveWriter.cpp
+++ b/llvm/lib/Object/ArchiveWriter.cpp
@@ -678,7 +678,8 @@ static bool isECObject(object::SymbolicFile &Obj) {
}
bool isImportDescriptor(const std::string_view Name) {
- return Name.substr(0, ImportDescriptorPrefix.size()) == ImportDescriptorPrefix ||
+ return Name.substr(0, ImportDescriptorPrefix.size()) ==
+ ImportDescriptorPrefix ||
Name == NullImportDescriptorSymbolName ||
(Name.substr(0, NullThunkDataPrefix.size()) == NullThunkDataPrefix &&
Name.size() > NullThunkDataSuffix.size() &&
diff --git a/llvm/lib/Object/COFFImportFile.cpp b/llvm/lib/Object/COFFImportFile.cpp
index f2f2b3835e..46c8e70258 100644
--- a/llvm/lib/Object/COFFImportFile.cpp
+++ b/llvm/lib/Object/COFFImportFile.cpp
@@ -190,7 +190,8 @@ public:
ObjectFactory(StringRef S, MachineTypes M)
: NativeMachine(M), ImportName(S), Library(llvm::sys::path::stem(S)),
ImportDescriptorSymbolName((ImportDescriptorPrefix + Library).str()),
- NullThunkSymbolName((NullThunkDataPrefix + Library + NullThunkDataSuffix).str()) {}
+ NullThunkSymbolName(
+ (NullThunkDataPrefix + Library + NullThunkDataSuffix).str()) {}
// Creates an Import Descriptor. This is a small object file which contains a
// reference to the terminators and contains the library name (entry) for the
``````````
</details>
https://github.com/llvm/llvm-project/pull/84834
More information about the llvm-commits
mailing list