[llvm] [BOLT] Skip _init; avoiding GOT breakage for static binaries (PR #117751)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 26 09:31:55 PST 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 0ccc3895126aaa94ae3fe890fcca0ad69658bbab 4683703ccd54ba5cb39fdfba471e66746d102e3d --extensions cpp -- bolt/lib/Rewrite/RewriteInstance.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp
index bfef815c73..89eb323dbe 100644
--- a/bolt/lib/Rewrite/RewriteInstance.cpp
+++ b/bolt/lib/Rewrite/RewriteInstance.cpp
@@ -2936,7 +2936,7 @@ static bool isInitFunction(const BinaryFunction &Function) {
// moved _init, causing a runtime crash. Skipping _init on the other
// hand should be harmless.
bool ShouldSkip =
- Function.hasName("_init") && Function.getOriginSectionName() == ".init";
+ Function.hasName("_init") && Function.getOriginSectionName() == ".init";
if (ShouldSkip)
LLVM_DEBUG(dbgs() << "BOLT-DEBUG: skip _init in for GOT workaround.\n");
return ShouldSkip;
``````````
</details>
https://github.com/llvm/llvm-project/pull/117751
More information about the llvm-commits
mailing list