[llvm] 59b1d63 - [llvm][SandBoxIR] Fix Windows+clang compiler warning (#146905)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 7 08:34:58 PDT 2025


Author: David Spickett
Date: 2025-07-07T16:34:55+01:00
New Revision: 59b1d631d7c80c956c971de92350076591d9c0ad

URL: https://github.com/llvm/llvm-project/commit/59b1d631d7c80c956c971de92350076591d9c0ad
DIFF: https://github.com/llvm/llvm-project/commit/59b1d631d7c80c956c971de92350076591d9c0ad.diff

LOG: [llvm][SandBoxIR] Fix Windows+clang compiler warning (#146905)

C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\llvm\include\llvm/SandboxIR/Value.h(172,16):
warning: unqualified friend declaration referring to type outside of the
nearest enclosing namespace is a Microsoft extension; add a nested name
specifier [-Wmicrosoft-unqualified-friend]

Clang suggests adding ::llvm::, but:
* Region is in ::llvm::sandboxir
* Region is not defined at this point

So forward declare it.

Added: 
    

Modified: 
    llvm/include/llvm/SandboxIR/Value.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/SandboxIR/Value.h b/llvm/include/llvm/SandboxIR/Value.h
index dd0bc76db3e37..8e50614d6a6d0 100644
--- a/llvm/include/llvm/SandboxIR/Value.h
+++ b/llvm/include/llvm/SandboxIR/Value.h
@@ -33,6 +33,7 @@ class IntrinsicInst;
 class Operator;
 class OverflowingBinaryOperator;
 class FPMathOperator;
+class Region;
 
 /// Iterator for the `Use` edges of a Value's users.
 /// \Returns a `Use` when dereferenced.


        


More information about the llvm-commits mailing list