Skip to content

Commit 446e793

Browse files
committed
[SandboxIR] Fix warning when building on Windows with clang-cl. NFC.
This fixes: ``` [1230/3381] Building CXX object lib\Transforms\Vectorize\CMakeFiles\LLVMVectorize.dir\SandboxVectorizer\VecUtils.cpp.obj In file included from C:\git\llvm-project\llvm\lib\Transforms\Vectorize\SandboxVectorizer\VecUtils.cpp:9: In file included from C:\git\llvm-project\llvm\include\llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h:17: C:\git\llvm-project\llvm\include\llvm/SandboxIR/Type.h(55,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] 55 | friend class CallBase; // For LLVMTy. | ^ | ::llvm:: C:\git\llvm-project\llvm\include\llvm/SandboxIR/Type.h(60,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] 60 | friend class CmpInst; // For LLVMTy. TODO: Cleanup after | ^ | ::llvm:: 2 warnings generated. ```
1 parent 550d148 commit 446e793

File tree

1 file changed

+10
-8
lines changed
  • llvm/include/llvm/SandboxIR

1 file changed

+10
-8
lines changed

llvm/include/llvm/SandboxIR/Type.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,20 @@ namespace llvm::sandboxir {
2323

2424
class Context;
2525
// Forward declare friend classes for MSVC.
26-
class PointerType;
27-
class VectorType;
26+
class ArrayType;
27+
class CallBase;
28+
class CmpInst;
29+
class ConstantDataSequential;
2830
class FixedVectorType;
29-
class ScalableVectorType;
30-
class IntegerType;
31+
class FPMathOperator;
3132
class FunctionType;
32-
class ArrayType;
33+
class IntegerType;
34+
class Module;
35+
class PointerType;
36+
class ScalableVectorType;
3337
class StructType;
3438
class TargetExtType;
35-
class Module;
36-
class FPMathOperator;
37-
class ConstantDataSequential;
39+
class VectorType;
3840
#define DEF_INSTR(ID, OPCODE, CLASS) class CLASS;
3941
#define DEF_CONST(ID, CLASS) class CLASS;
4042
#include "llvm/SandboxIR/Values.def"

0 commit comments

Comments
 (0)