Make helper static and place random global into the llvm namespace.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 12 Apr 2014 18:39:57 +0000 (18:39 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 12 Apr 2014 18:39:57 +0000 (18:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206116 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMFeatures.h
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp

index 47f5bf929c7dc17bedb97ffd7e266d99f6f0ee42..f67d578d1041fcf5a49a2f999fdd63ce08f7dff3 100644 (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())
index 2c5a8c5164c034dedec593d9a1ddd47e862d7d0b..e191a3c779f1cd713f973eda6ca075db26cebd7f 100644 (file)
 
 #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()) {
index b6dadd8f89afa1930dc5a58caae0c9a17707e64f..88fc087bb739ce8451567f6b7c5591fe552bd74a 100644 (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
 }
 
index 34cc1b630c3b7b7a709de545922971563937d958..2f06adc798d3772e222ba63794d186f4e67c78d0 100644 (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),