Skip to content

Commit 6a44af3

Browse files
committed
Give internal classes hidden visibility.
Worth 100k on a linux/x86_64 Release+Asserts clang. llvm-svn: 190534
1 parent 786d32e commit 6a44af3

35 files changed

+83
-82
lines changed

llvm/lib/AsmParser/LLLexer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace llvm {
2626
class SMDiagnostic;
2727
class LLVMContext;
2828

29-
class LLLexer {
29+
class LLVM_LIBRARY_VISIBILITY LLLexer {
3030
const char *CurPtr;
3131
MemoryBuffer *CurBuf;
3232
SMDiagnostic &ErrorInfo;

llvm/lib/AsmParser/LLParser.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace llvm {
4242
/// There are several cases where we have to parse the value but where the
4343
/// type can depend on later context. This may either be a numeric reference
4444
/// or a symbolic (%var) reference. This is just a discriminated union.
45-
struct ValID {
45+
struct LLVM_LIBRARY_VISIBILITY ValID {
4646
enum {
4747
t_LocalID, t_GlobalID, // ID in UIntVal.
4848
t_LocalName, t_GlobalName, // Name in StrVal.
@@ -83,7 +83,7 @@ namespace llvm {
8383
}
8484
};
8585

86-
class LLParser {
86+
class LLVM_LIBRARY_VISIBILITY LLParser {
8787
public:
8888
typedef LLLexer::LocTy LocTy;
8989
private:

llvm/lib/Bitcode/Reader/BitcodeReader.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace llvm {
3232
// BitcodeReaderValueList Class
3333
//===----------------------------------------------------------------------===//
3434

35-
class BitcodeReaderValueList {
35+
class LLVM_LIBRARY_VISIBILITY BitcodeReaderValueList {
3636
std::vector<WeakVH> ValuePtrs;
3737

3838
/// ResolveConstants - As we resolve forward-referenced constants, we add
@@ -91,7 +91,7 @@ class BitcodeReaderValueList {
9191
// BitcodeReaderMDValueList Class
9292
//===----------------------------------------------------------------------===//
9393

94-
class BitcodeReaderMDValueList {
94+
class LLVM_LIBRARY_VISIBILITY BitcodeReaderMDValueList {
9595
std::vector<WeakVH> MDValuePtrs;
9696

9797
LLVMContext &Context;
@@ -121,7 +121,7 @@ class BitcodeReaderMDValueList {
121121
void AssignValue(Value *V, unsigned Idx);
122122
};
123123

124-
class BitcodeReader : public GVMaterializer {
124+
class LLVM_LIBRARY_VISIBILITY BitcodeReader : public GVMaterializer {
125125
LLVMContext &Context;
126126
Module *TheModule;
127127
MemoryBuffer *Buffer;

llvm/lib/Bitcode/Writer/ValueEnumerator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ValueSymbolTable;
3434
class MDSymbolTable;
3535
class raw_ostream;
3636

37-
class ValueEnumerator {
37+
class LLVM_LIBRARY_VISIBILITY ValueEnumerator {
3838
public:
3939
typedef std::vector<Type*> TypeList;
4040

llvm/lib/CodeGen/AggressiveAntiDepBreaker.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class RegisterClassInfo;
3434

3535
/// Class AggressiveAntiDepState
3636
/// Contains all the state necessary for anti-dep breaking.
37-
class AggressiveAntiDepState {
37+
class LLVM_LIBRARY_VISIBILITY AggressiveAntiDepState {
3838
public:
3939
/// RegisterReference - Information about a register reference
4040
/// within a liverange
@@ -114,7 +114,8 @@ class RegisterClassInfo;
114114

115115

116116
/// Class AggressiveAntiDepBreaker
117-
class AggressiveAntiDepBreaker : public AntiDepBreaker {
117+
class LLVM_LIBRARY_VISIBILITY AggressiveAntiDepBreaker
118+
: public AntiDepBreaker {
118119
MachineFunction& MF;
119120
MachineRegisterInfo &MRI;
120121
const TargetInstrInfo *TII;

llvm/lib/CodeGen/AllocationOrder.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace llvm {
2525
class RegisterClassInfo;
2626
class VirtRegMap;
2727

28-
class AllocationOrder {
28+
class LLVM_LIBRARY_VISIBILITY AllocationOrder {
2929
SmallVector<MCPhysReg, 16> Hints;
3030
ArrayRef<MCPhysReg> Order;
3131
int Pos;

llvm/lib/CodeGen/AntiDepBreaker.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace llvm {
2828
/// AntiDepBreaker - This class works into conjunction with the
2929
/// post-RA scheduler to rename registers to break register
3030
/// anti-dependencies.
31-
class AntiDepBreaker {
31+
class LLVM_LIBRARY_VISIBILITY AntiDepBreaker {
3232
public:
3333
typedef std::vector<std::pair<MachineInstr *, MachineInstr *> >
3434
DbgValueVector;

llvm/lib/CodeGen/AsmPrinter/DIE.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace llvm {
3030
//===--------------------------------------------------------------------===//
3131
/// DIEAbbrevData - Dwarf abbreviation data, describes one attribute of a
3232
/// Dwarf abbreviation.
33-
class DIEAbbrevData {
33+
class LLVM_LIBRARY_VISIBILITY DIEAbbrevData {
3434
/// Attribute - Dwarf attribute code.
3535
///
3636
uint16_t Attribute;
@@ -53,7 +53,7 @@ namespace llvm {
5353
//===--------------------------------------------------------------------===//
5454
/// DIEAbbrev - Dwarf abbreviation, describes the organization of a debug
5555
/// information object.
56-
class DIEAbbrev : public FoldingSetNode {
56+
class LLVM_LIBRARY_VISIBILITY DIEAbbrev : public FoldingSetNode {
5757
/// Tag - Dwarf tag code.
5858
///
5959
uint16_t Tag;
@@ -107,7 +107,7 @@ namespace llvm {
107107
/// describes its organization.
108108
class DIEValue;
109109

110-
class DIE {
110+
class LLVM_LIBRARY_VISIBILITY DIE {
111111
protected:
112112
/// Offset - Offset in debug info section.
113113
///
@@ -188,7 +188,7 @@ namespace llvm {
188188
//===--------------------------------------------------------------------===//
189189
/// DIEValue - A debug information entry value.
190190
///
191-
class DIEValue {
191+
class LLVM_LIBRARY_VISIBILITY DIEValue {
192192
virtual void anchor();
193193
public:
194194
enum {
@@ -228,7 +228,7 @@ namespace llvm {
228228
//===--------------------------------------------------------------------===//
229229
/// DIEInteger - An integer value DIE.
230230
///
231-
class DIEInteger : public DIEValue {
231+
class LLVM_LIBRARY_VISIBILITY DIEInteger : public DIEValue {
232232
uint64_t Integer;
233233
public:
234234
explicit DIEInteger(uint64_t I) : DIEValue(isInteger), Integer(I) {}
@@ -270,7 +270,7 @@ namespace llvm {
270270
//===--------------------------------------------------------------------===//
271271
/// DIEExpr - An expression DIE.
272272
//
273-
class DIEExpr : public DIEValue {
273+
class LLVM_LIBRARY_VISIBILITY DIEExpr : public DIEValue {
274274
const MCExpr *Expr;
275275
public:
276276
explicit DIEExpr(const MCExpr *E) : DIEValue(isExpr), Expr(E) {}
@@ -298,7 +298,7 @@ namespace llvm {
298298
//===--------------------------------------------------------------------===//
299299
/// DIELabel - A label DIE.
300300
//
301-
class DIELabel : public DIEValue {
301+
class LLVM_LIBRARY_VISIBILITY DIELabel : public DIEValue {
302302
const MCSymbol *Label;
303303
public:
304304
explicit DIELabel(const MCSymbol *L) : DIEValue(isLabel), Label(L) {}
@@ -326,7 +326,7 @@ namespace llvm {
326326
//===--------------------------------------------------------------------===//
327327
/// DIEDelta - A simple label difference DIE.
328328
///
329-
class DIEDelta : public DIEValue {
329+
class LLVM_LIBRARY_VISIBILITY DIEDelta : public DIEValue {
330330
const MCSymbol *LabelHi;
331331
const MCSymbol *LabelLo;
332332
public:
@@ -352,7 +352,7 @@ namespace llvm {
352352
//===--------------------------------------------------------------------===//
353353
/// DIEString - A container for string values.
354354
///
355-
class DIEString : public DIEValue {
355+
class LLVM_LIBRARY_VISIBILITY DIEString : public DIEValue {
356356
const DIEValue *Access;
357357
const StringRef Str;
358358

@@ -383,7 +383,7 @@ namespace llvm {
383383
/// DIEEntry - A pointer to another debug information entry. An instance of
384384
/// this class can also be used as a proxy for a debug information entry not
385385
/// yet defined (ie. types.)
386-
class DIEEntry : public DIEValue {
386+
class LLVM_LIBRARY_VISIBILITY DIEEntry : public DIEValue {
387387
DIE *const Entry;
388388
public:
389389
explicit DIEEntry(DIE *E) : DIEValue(isEntry), Entry(E) {
@@ -417,7 +417,7 @@ namespace llvm {
417417
//===--------------------------------------------------------------------===//
418418
/// DIEBlock - A block of values. Primarily used for location expressions.
419419
//
420-
class DIEBlock : public DIEValue, public DIE {
420+
class LLVM_LIBRARY_VISIBILITY DIEBlock : public DIEValue, public DIE {
421421
unsigned Size; // Size in bytes excluding size header.
422422
public:
423423
DIEBlock()

llvm/lib/CodeGen/AsmPrinter/DIEHash.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CompileUnit;
1919

2020
/// \brief An object containing the capability of hashing and adding hash
2121
/// attributes onto a DIE.
22-
class DIEHash {
22+
class LLVM_LIBRARY_VISIBILITY DIEHash {
2323
// The entry for a particular attribute.
2424
struct AttrEntry {
2525
const DIEValue *Val;

llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class AsmPrinter;
6565
class DIE;
6666
class DwarfUnits;
6767

68-
class DwarfAccelTable {
68+
class LLVM_LIBRARY_VISIBILITY DwarfAccelTable {
6969

7070
static uint32_t HashDJB(StringRef Str) {
7171
uint32_t h = 5381;

llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class DbgVariable;
3434
//===----------------------------------------------------------------------===//
3535
/// CompileUnit - This dwarf writer support class manages information associated
3636
/// with a source file.
37-
class CompileUnit {
37+
class LLVM_LIBRARY_VISIBILITY CompileUnit {
3838
/// UniqueID - a numeric ID unique among all CUs in the module
3939
///
4040
unsigned UniqueID;

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class DIEEntry;
4444

4545
//===----------------------------------------------------------------------===//
4646
/// \brief This class is used to record source line correspondence.
47-
class SrcLineInfo {
47+
class LLVM_LIBRARY_VISIBILITY SrcLineInfo {
4848
unsigned Line; // Source line number.
4949
unsigned Column; // Source column.
5050
unsigned SourceID; // Source ID number.
@@ -62,7 +62,7 @@ class SrcLineInfo {
6262

6363
/// \brief This struct describes location entries emitted in the .debug_loc
6464
/// section.
65-
class DotDebugLocEntry {
65+
class LLVM_LIBRARY_VISIBILITY DotDebugLocEntry {
6666
// Begin and end symbols for the address range that this location is valid.
6767
const MCSymbol *Begin;
6868
const MCSymbol *End;
@@ -143,7 +143,7 @@ class DotDebugLocEntry {
143143

144144
//===----------------------------------------------------------------------===//
145145
/// \brief This class is used to track local variable information.
146-
class DbgVariable {
146+
class LLVM_LIBRARY_VISIBILITY DbgVariable {
147147
DIVariable Var; // Variable Descriptor.
148148
DIE *TheDIE; // Variable DIE.
149149
unsigned DotDebugLocOffset; // Offset in DotDebugLocEntries.
@@ -212,7 +212,7 @@ class DbgVariable {
212212

213213
/// \brief Collects and handles information specific to a particular
214214
/// collection of units.
215-
class DwarfUnits {
215+
class LLVM_LIBRARY_VISIBILITY DwarfUnits {
216216
// Target of Dwarf emission, used for sizing of abbreviations.
217217
AsmPrinter *Asm;
218218

@@ -301,7 +301,7 @@ class DwarfUnits {
301301
};
302302

303303
/// \brief Collects and handles dwarf debug information.
304-
class DwarfDebug {
304+
class LLVM_LIBRARY_VISIBILITY DwarfDebug {
305305
// Target of Dwarf emission.
306306
AsmPrinter *Asm;
307307

llvm/lib/CodeGen/AsmPrinter/DwarfException.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class AsmPrinter;
3434
//===----------------------------------------------------------------------===//
3535
/// DwarfException - Emits Dwarf exception handling directives.
3636
///
37-
class DwarfException {
37+
class LLVM_LIBRARY_VISIBILITY DwarfException {
3838
protected:
3939
/// Asm - Target of Dwarf emission.
4040
AsmPrinter *Asm;
@@ -141,7 +141,7 @@ class DwarfException {
141141
virtual void EndFunction();
142142
};
143143

144-
class DwarfCFIException : public DwarfException {
144+
class LLVM_LIBRARY_VISIBILITY DwarfCFIException : public DwarfException {
145145
/// shouldEmitPersonality - Per-function flag to indicate if .cfi_personality
146146
/// should be emitted.
147147
bool shouldEmitPersonality;
@@ -175,7 +175,7 @@ class DwarfCFIException : public DwarfException {
175175
virtual void EndFunction();
176176
};
177177

178-
class ARMException : public DwarfException {
178+
class LLVM_LIBRARY_VISIBILITY ARMException : public DwarfException {
179179
void EmitTypeInfos(unsigned TTypeEncoding);
180180
public:
181181
//===--------------------------------------------------------------------===//
@@ -196,7 +196,7 @@ class ARMException : public DwarfException {
196196
virtual void EndFunction();
197197
};
198198

199-
class Win64Exception : public DwarfException {
199+
class LLVM_LIBRARY_VISIBILITY Win64Exception : public DwarfException {
200200
/// shouldEmitPersonality - Per-function flag to indicate if personality
201201
/// info should be emitted.
202202
bool shouldEmitPersonality;

llvm/lib/CodeGen/BranchFolding.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace llvm {
2121
class TargetInstrInfo;
2222
class TargetRegisterInfo;
2323

24-
class BranchFolder {
24+
class LLVM_LIBRARY_VISIBILITY BranchFolder {
2525
public:
2626
explicit BranchFolder(bool defaultEnableTailMerge, bool CommonHoist);
2727

llvm/lib/CodeGen/CriticalAntiDepBreaker.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class RegisterClassInfo;
3131
class TargetInstrInfo;
3232
class TargetRegisterInfo;
3333

34-
class CriticalAntiDepBreaker : public AntiDepBreaker {
34+
class LLVM_LIBRARY_VISIBILITY CriticalAntiDepBreaker : public AntiDepBreaker {
3535
MachineFunction& MF;
3636
MachineRegisterInfo &MRI;
3737
const TargetInstrInfo *TII;

llvm/lib/CodeGen/InterferenceCache.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace llvm {
2121

2222
class LiveIntervals;
2323

24-
class InterferenceCache {
24+
class LLVM_LIBRARY_VISIBILITY InterferenceCache {
2525
const TargetRegisterInfo *TRI;
2626
LiveIntervalUnion *LIUArray;
2727
MachineFunction *MF;

llvm/lib/CodeGen/LiveDebugVariables.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LiveInterval;
3030
class LiveIntervals;
3131
class VirtRegMap;
3232

33-
class LiveDebugVariables : public MachineFunctionPass {
33+
class LLVM_LIBRARY_VISIBILITY LiveDebugVariables : public MachineFunctionPass {
3434
void *pImpl;
3535
public:
3636
static char ID; // Pass identification, replacement for typeid

llvm/lib/CodeGen/LiveRangeCalc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class MachineDominatorTree;
3333
template <class NodeT> class DomTreeNodeBase;
3434
typedef DomTreeNodeBase<MachineBasicBlock> MachineDomTreeNode;
3535

36-
class LiveRangeCalc {
36+
class LLVM_LIBRARY_VISIBILITY LiveRangeCalc {
3737
const MachineFunction *MF;
3838
const MachineRegisterInfo *MRI;
3939
SlotIndexes *Indexes;

llvm/lib/CodeGen/PrologEpilogInserter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace llvm {
3333
class RegScavenger;
3434
class MachineBasicBlock;
3535

36-
class PEI : public MachineFunctionPass {
36+
class LLVM_LIBRARY_VISIBILITY PEI : public MachineFunctionPass {
3737
public:
3838
static char ID;
3939
PEI() : MachineFunctionPass(ID) {

llvm/lib/CodeGen/RegAllocBase.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Spiller;
5656
/// Register allocators must override the selectOrSplit() method to implement
5757
/// live range splitting. They must also override enqueue/dequeue to provide an
5858
/// assignment order.
59-
class RegAllocBase {
59+
class LLVM_LIBRARY_VISIBILITY RegAllocBase {
6060
protected:
6161
const TargetRegisterInfo *TRI;
6262
MachineRegisterInfo *MRI;

llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MachineInstrBuilder;
2626
class MCInstrDesc;
2727
class SDDbgValue;
2828

29-
class InstrEmitter {
29+
class LLVM_LIBRARY_VISIBILITY InstrEmitter {
3030
MachineFunction *MF;
3131
MachineRegisterInfo *MRI;
3232
const TargetMachine *TM;

llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Value;
2727
/// SDDbgValue - Holds the information from a dbg_value node through SDISel.
2828
/// We do not use SDValue here to avoid including its header.
2929

30-
class SDDbgValue {
30+
class LLVM_LIBRARY_VISIBILITY SDDbgValue {
3131
public:
3232
enum DbgValueKind {
3333
SDNODE = 0, // value is the result of an expression

llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace llvm {
3333
/// edges. Physical register dependence information is not carried in
3434
/// the DAG and must be handled explicitly by schedulers.
3535
///
36-
class ScheduleDAGSDNodes : public ScheduleDAG {
36+
class LLVM_LIBRARY_VISIBILITY ScheduleDAGSDNodes : public ScheduleDAG {
3737
public:
3838
MachineBasicBlock *BB;
3939
SelectionDAG *DAG; // DAG of the current basic block

0 commit comments

Comments
 (0)