[clang-tools-extra] 8dbe9b2 - [Clang-tools-extra] Mark override a function which overrides a virtual one

2020-07-28 Thread Anh Tuyen Tran via cfe-commits

Author: Anh Tuyen Tran
Date: 2020-07-29T05:30:33Z
New Revision: 8dbe9b249846be81bc676543698db14ee37e28e2

URL: 
https://github.com/llvm/llvm-project/commit/8dbe9b249846be81bc676543698db14ee37e28e2
DIFF: 
https://github.com/llvm/llvm-project/commit/8dbe9b249846be81bc676543698db14ee37e28e2.diff

LOG: [Clang-tools-extra] Mark override a function which overrides a virtual one

Function void run() on line 286 overrides a virtual function on line 92 of
clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp.  Not marking it override will
cause a build failure when we use -Werror (every warning is treated as an 
error).

Reviewed By: kbobyrev (Kirill Bobyrev)

Differential Revision: https://reviews.llvm.org/D84794

Added: 


Modified: 
clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp

Removed: 




diff  --git a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp 
b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
index 80d87aa3f9f5..ca35f620bba1 100644
--- a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
+++ b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
@@ -283,7 +283,7 @@ class Export : public Command {
   };
 
 public:
-  void run() {
+  void run() override {
 using namespace clang::clangd;
 // Read input file (as specified in global option)
 auto Buffer = llvm::MemoryBuffer::getFile(IndexLocation);



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-19 Thread Anh Tuyen Tran via cfe-commits


@@ -795,7 +795,8 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, 
Compilation &C,
 else {
   CmdArgs.push_back("-fprofile-continuous");
   // Platforms that require a bias variable:
-  if (T.isOSBinFormatELF() || T.isOSAIX()) {
+  if (T.isOSBinFormatELF() || T.isOSAIX() ||
+  T.isKnownWindowsMSVCEnvironment()) {

anhtuyenibm wrote:

Thanks, @w2yehia 
Just a quick question, but since **reloc** is applicable with **_WIN32**, do we 
only need **T.isOSWindows()**, or is **T.isKnownWindowsMSVCEnvironment()** 
still required?
```
  bool isOSWindows() const {
return getOS() == Triple::Win32;
  }
```
VS
```
  /// Checks if the environment is MSVC.
  bool isKnownWindowsMSVCEnvironment() const {
return isOSWindows() && getEnvironment() == Triple::MSVC;
  }

``` 

https://github.com/llvm/llvm-project/blob/5f8b2568219d5e516928aed67f13b59de8ccee17/llvm/include/llvm/TargetParser/Triple.h#L655

https://github.com/llvm/llvm-project/pull/127858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-19 Thread Anh Tuyen Tran via cfe-commits


@@ -6,6 +6,7 @@
 
 // RUN: %clang --target=powerpc64-ibm-aix -fprofile-generate 
-fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC
 // RUN: %clang --target=x86_64-unknown-fuchsia -fprofile-generate 
-fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC
+// RUN: %clang --target=x86_64-windows-msvc -fprofile-generate 
-fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC

anhtuyenibm wrote:

If my other comment makes sense, i.e. we will apply reloc only for 32-bit 
Windows, should we change the target from **x86_64-windows-msvc** to 
**i686-windows-msvc**?

https://github.com/llvm/llvm-project/pull/127858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-20 Thread Anh Tuyen Tran via cfe-commits


@@ -795,7 +795,8 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, 
Compilation &C,
 else {
   CmdArgs.push_back("-fprofile-continuous");
   // Platforms that require a bias variable:
-  if (T.isOSBinFormatELF() || T.isOSAIX()) {
+  if (T.isOSBinFormatELF() || T.isOSAIX() ||
+  T.isKnownWindowsMSVCEnvironment()) {

anhtuyenibm wrote:

Although I assume **Triple::Win32** aligns more closely to _WIN32, your point 
is reasonable. 

https://github.com/llvm/llvm-project/pull/127858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-20 Thread Anh Tuyen Tran via cfe-commits

https://github.com/anhtuyenibm edited 
https://github.com/llvm/llvm-project/pull/127858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-20 Thread Anh Tuyen Tran via cfe-commits


@@ -6,6 +6,7 @@
 
 // RUN: %clang --target=powerpc64-ibm-aix -fprofile-generate 
-fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC
 // RUN: %clang --target=x86_64-unknown-fuchsia -fprofile-generate 
-fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC
+// RUN: %clang --target=x86_64-windows-msvc -fprofile-generate 
-fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC

anhtuyenibm wrote:

FYI: I got to the above target based on 
```
; RUN: llc < %s -mtriple=i686-windows-msvc | FileCheck %s --check-prefix=WIN32
; RUN: llc < %s -mtriple=x86_64-windows-msvc | FileCheck %s --check-prefix=WIN64
```
https://github.com/llvm/llvm-project/blob/8363b0a6bab041b54316962e3e8948098148baeb/llvm/test/CodeGen/X86/extern_weak.ll#L4

https://github.com/llvm/llvm-project/pull/127858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-20 Thread Anh Tuyen Tran via cfe-commits

https://github.com/anhtuyenibm approved this pull request.

Thanks for pointing out this reference page. The changes look good to me.

https://github.com/llvm/llvm-project/pull/127858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits