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

llvm-svn: 206116
This commit is contained in:
Benjamin Kramer 2014-04-12 18:39:57 +00:00
parent 8cdb9df6a5
commit 30120c0626
4 changed files with 9 additions and 10 deletions

View File

@ -535,7 +535,7 @@ bool ARMBaseInstrInfo::isPredicable(MachineInstr *MI) const {
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) {
const MachineOperand &MO = MI->getOperand(i);
if (!MO.isReg() || MO.isUndef() || MO.isUse())

View File

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

View File

@ -7975,7 +7975,7 @@ unsigned ARMAsmParser::checkTargetMatchPredicate(MCInst &Inst) {
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
}

View File

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