mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 22:20:37 +00:00
Move helper classes into anonymous namespaces. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269591 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
746e3cee24
commit
95ce0c789b
@ -37,6 +37,7 @@
|
||||
#include <map>
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
/// These are manifest constants used by the bitcode writer. They do not need to
|
||||
/// be kept in sync with the reader, but need to be consistent within this file.
|
||||
enum {
|
||||
@ -463,6 +464,7 @@ private:
|
||||
}
|
||||
std::map<GlobalValue::GUID, unsigned> &valueIds() { return GUIDToValueIdMap; }
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
static unsigned getEncodedCastOpcode(unsigned Opcode) {
|
||||
switch (Opcode) {
|
||||
|
@ -14,6 +14,7 @@
|
||||
using namespace llvm;
|
||||
using namespace llvm::pdb;
|
||||
|
||||
namespace {
|
||||
class GenericErrorCategory : public std::error_category {
|
||||
public:
|
||||
const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb"; }
|
||||
@ -33,6 +34,7 @@ public:
|
||||
llvm_unreachable("Unrecognized generic_error_code");
|
||||
}
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
static ManagedStatic<GenericErrorCategory> Category;
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
using namespace llvm;
|
||||
using namespace llvm::pdb;
|
||||
|
||||
namespace {
|
||||
class RawErrorCategory : public std::error_category {
|
||||
public:
|
||||
const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb.raw"; }
|
||||
@ -24,6 +25,7 @@ public:
|
||||
llvm_unreachable("Unrecognized raw_error_code");
|
||||
}
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
static ManagedStatic<RawErrorCategory> Category;
|
||||
|
||||
|
@ -589,7 +589,7 @@ bool AArch64ExpandPseudo::expandMOVImm(MachineBasicBlock &MBB,
|
||||
return true;
|
||||
}
|
||||
|
||||
void addPostLoopLiveIns(MachineBasicBlock *MBB, LivePhysRegs &LiveRegs) {
|
||||
static void addPostLoopLiveIns(MachineBasicBlock *MBB, LivePhysRegs &LiveRegs) {
|
||||
for (auto I = LiveRegs.begin(); I != LiveRegs.end(); ++I)
|
||||
MBB->addLiveIn(*I);
|
||||
}
|
||||
|
@ -144,6 +144,7 @@ ModulePass *llvm::createPGOIndirectCallPromotionLegacyPass(bool InLTO) {
|
||||
return new PGOIndirectCallPromotionLegacyPass(InLTO);
|
||||
}
|
||||
|
||||
namespace {
|
||||
// The class for main data structure to promote indirect calls to conditional
|
||||
// direct calls.
|
||||
class ICallPromotionFunc {
|
||||
@ -234,6 +235,7 @@ public:
|
||||
}
|
||||
bool processFunction();
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
bool ICallPromotionFunc::isPromotionProfitable(uint64_t Count,
|
||||
uint64_t TotalCount) {
|
||||
|
@ -100,7 +100,7 @@ static bool DCEInstruction(Instruction *I,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool eliminateDeadCode(Function &F, TargetLibraryInfo *TLI) {
|
||||
static bool eliminateDeadCode(Function &F, TargetLibraryInfo *TLI) {
|
||||
bool MadeChange = false;
|
||||
SmallSetVector<Instruction *, 16> WorkList;
|
||||
// Iterate over the original function, only adding insts to the worklist
|
||||
|
Loading…
Reference in New Issue
Block a user