From 2c2ba4c6050014b6941aedbb098296f8d0cf57a1 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 12 Apr 2014 18:45:24 +0000 Subject: [PATCH] Spell the specialization namespace correctly. Not sure why clang didn't diagnose this (GCC does). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206117 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMBaseInstrInfo.cpp | 4 +++- lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index f67d578d104..184b2abab72 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -535,7 +535,8 @@ bool ARMBaseInstrInfo::isPredicable(MachineInstr *MI) const { return true; } -template <> bool llvm::IsCPSRDead(MachineInstr *MI) { +namespace llvm { +template <> bool IsCPSRDead(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()) @@ -548,6 +549,7 @@ template <> bool llvm::IsCPSRDead(MachineInstr *MI) { // all definitions of CPSR are dead return true; } +} /// FIXME: Works around a gcc miscompilation with -fstrict-aliasing. LLVM_ATTRIBUTE_NOINLINE diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 88fc087bb73..a22d03e20be 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -7975,9 +7975,11 @@ unsigned ARMAsmParser::checkTargetMatchPredicate(MCInst &Inst) { return Match_Success; } -template <> inline bool llvm::IsCPSRDead(MCInst *Instr) { +namespace llvm { +template <> inline bool IsCPSRDead(MCInst *Instr) { return true; // In an assembly source, no need to second-guess } +} static const char *getSubtargetFeatureName(unsigned Val); bool ARMAsmParser::