Skip to content

Commit 8345289

Browse files
authored
[LLVM] Fix missing includes for function declarations that will be needed for explicit symbol visibility (#103900)
In multiple source files function definitions never sees there declaration in a header because its never included causing linker errors when explicit symbol visibility macros\dllexport are added to the declarations. Most of these were originally found by @tstellar in #67502 TargetRegistry.h is needed in MCExternalSymbolizer.cpp for createMCSymbolizer Analysis/Passes.h is needed in LazyValueInfo.cpp and RegionInfo.cpp for createLazyValueInfoPassin and createRegionInfoPass Transforms/Scalar.h is needed in SpeculativeExecution.cpp for createSpeculativeExecutionPass
1 parent b5e47d2 commit 8345289

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

llvm/lib/Analysis/LazyValueInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "llvm/Analysis/AssumptionCache.h"
1818
#include "llvm/Analysis/ConstantFolding.h"
1919
#include "llvm/Analysis/InstructionSimplify.h"
20+
#include "llvm/Analysis/Passes.h"
2021
#include "llvm/Analysis/TargetLibraryInfo.h"
2122
#include "llvm/Analysis/ValueLattice.h"
2223
#include "llvm/Analysis/ValueTracking.h"

llvm/lib/Analysis/RegionInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#ifndef NDEBUG
1616
#include "llvm/Analysis/RegionPrinter.h"
1717
#endif
18+
#include "llvm/Analysis/Passes.h"
1819
#include "llvm/Analysis/RegionInfoImpl.h"
1920
#include "llvm/Config/llvm-config.h"
2021
#include "llvm/IR/Function.h"

llvm/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "llvm/MC/MCContext.h"
1111
#include "llvm/MC/MCExpr.h"
1212
#include "llvm/MC/MCInst.h"
13+
#include "llvm/MC/TargetRegistry.h"
1314
#include "llvm/Support/raw_ostream.h"
1415
#include <cstring>
1516

llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
#include "llvm/InitializePasses.h"
7272
#include "llvm/Support/CommandLine.h"
7373
#include "llvm/Support/Debug.h"
74+
#include "llvm/Transforms/Scalar.h"
7475

7576
using namespace llvm;
7677

0 commit comments

Comments
 (0)