[llvm] [BOLT] Support relative vtable (PR #135449)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 11 15:42:11 PDT 2025
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 HEAD~1 HEAD --extensions cpp -- bolt/test/runtime/relative-vftable.cpp bolt/lib/Core/Relocation.cpp bolt/lib/Rewrite/RewriteInstance.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/bolt/test/runtime/relative-vftable.cpp b/bolt/test/runtime/relative-vftable.cpp
index f4c14c30f..e1a57177f 100644
--- a/bolt/test/runtime/relative-vftable.cpp
+++ b/bolt/test/runtime/relative-vftable.cpp
@@ -15,10 +15,11 @@
// RUN: llvm-bolt --instrument %t/main.so -o %t/main.instr.so
// RUN: %t/main.instr.so | FileCheck %s
-;--- tt.h
+;
+-- -tt.h
#include <stdio.h>
-class Base {
+ class Base {
public:
virtual void foo();
virtual void bar();
@@ -32,15 +33,23 @@ public:
virtual void goo() override;
};
-;--- tt.cpp
+;
+-- -tt.cpp
#include "tt.h"
-void Derived::goo() { printf("derived_goo\n"); }
+ void
+ Derived::goo() {
+ printf("derived_goo\n");
+}
-;--- main.cpp
+;
+-- -main.cpp
#include "tt.h"
-// #pragma clang optimize off
+ // #pragma clang optimize off
-void Base::foo() { printf("base_foo\n"); }
+ void
+ Base::foo() {
+ printf("base_foo\n");
+}
void Base::bar() { printf("base_bar\n"); }
void Base::goo() { printf("base_goo\n"); }
``````````
</details>
https://github.com/llvm/llvm-project/pull/135449
More information about the llvm-commits
mailing list