Make helper static and place random global into the llvm namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206116 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2014-04-12 18:39:57 +00:00
parent 2ef2fd45b8
commit f6330705bd
4 changed files with 9 additions and 10 deletions

View File

@ -535,7 +535,7 @@ bool ARMBaseInstrInfo::isPredicable(MachineInstr *MI) const {
return true; return true;
} }
template<> bool IsCPSRDead<MachineInstr>(MachineInstr* MI) { template <> bool llvm::IsCPSRDead<MachineInstr>(MachineInstr *MI) {
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = MI->getOperand(i); const MachineOperand &MO = MI->getOperand(i);
if (!MO.isReg() || MO.isUndef() || MO.isUse()) if (!MO.isReg() || MO.isUndef() || MO.isUse())

View File

@ -16,11 +16,11 @@
#include "MCTargetDesc/ARMMCTargetDesc.h" #include "MCTargetDesc/ARMMCTargetDesc.h"
namespace llvm {
template<typename InstrType> // could be MachineInstr or MCInst template<typename InstrType> // could be MachineInstr or MCInst
bool IsCPSRDead(InstrType *Instr); bool IsCPSRDead(InstrType *Instr);
namespace llvm {
template<typename InstrType> // could be MachineInstr or MCInst template<typename InstrType> // could be MachineInstr or MCInst
inline bool isV8EligibleForIT(InstrType *Instr) { inline bool isV8EligibleForIT(InstrType *Instr) {
switch (Instr->getOpcode()) { switch (Instr->getOpcode()) {

View File

@ -7975,7 +7975,7 @@ unsigned ARMAsmParser::checkTargetMatchPredicate(MCInst &Inst) {
return Match_Success; return Match_Success;
} }
template<> inline bool IsCPSRDead<MCInst>(MCInst* Instr) { template <> inline bool llvm::IsCPSRDead<MCInst>(MCInst *Instr) {
return true; // In an assembly source, no need to second-guess return true; // In an assembly source, no need to second-guess
} }

View File

@ -216,12 +216,11 @@ DecodeStatus ARM64Disassembler::getInstruction(MCInst &MI, uint64_t &Size,
return Success; return Success;
} }
MCSymbolizer *createARM64ExternalSymbolizer( static MCSymbolizer *
StringRef TT, createARM64ExternalSymbolizer(StringRef TT, LLVMOpInfoCallback GetOpInfo,
LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp,
LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx,
void *DisInfo, MCContext *Ctx, MCRelocationInfo *RelInfo) {
MCRelocationInfo *RelInfo) {
return new llvm::ARM64ExternalSymbolizer( return new llvm::ARM64ExternalSymbolizer(
*Ctx, *Ctx,
std::unique_ptr<MCRelocationInfo>(RelInfo), std::unique_ptr<MCRelocationInfo>(RelInfo),