[llvm] r238664 - [Hexagon] Adding override specifier and removing erroneous assertion

Colin LeMahieu colinl at codeaurora.org
Sat May 30 13:03:07 PDT 2015


Author: colinl
Date: Sat May 30 15:03:07 2015
New Revision: 238664

URL: http://llvm.org/viewvc/llvm-project?rev=238664&view=rev
Log:
[Hexagon] Adding override specifier and removing erroneous assertion

Modified:
    llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp

Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp?rev=238664&r1=238663&r2=238664&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp Sat May 30 15:03:07 2015
@@ -39,8 +39,6 @@ public:
 
   bool isInstRelaxable(MCInst const &HMI) const {
     const MCInstrDesc &MCID = HexagonMCInstrInfo::getDesc(*MCII, HMI);
-    assert(&MCID && "invalid instruction");
-
     bool Relaxable = false;
     // Branches and loop-setup insns are handled as necessary by relaxation.
     if (llvm::HexagonMCInstrInfo::getType(*MCII, HMI) == HexagonII::TypeJ ||
@@ -58,7 +56,7 @@ public:
   /// relaxation.
   ///
   /// \param Inst - The instruction to test.
-  bool mayNeedRelaxation(MCInst const &Inst) const {
+  bool mayNeedRelaxation(MCInst const &Inst) const override {
     assert(HexagonMCInstrInfo::isBundle(Inst));
     bool PreviousIsExtender = false;
     for (auto const &I : HexagonMCInstrInfo::bundleInstructions(Inst)) {
@@ -77,7 +75,7 @@ public:
   bool fixupNeedsRelaxationAdvanced(const MCFixup &Fixup, bool Resolved,
                                     uint64_t Value,
                                     const MCRelaxableFragment *DF,
-                                    const MCAsmLayout &Layout) const {
+                                    const MCAsmLayout &Layout) const override {
     MCInst const &MCB = DF->getInst();
     assert(HexagonMCInstrInfo::isBundle(MCB));
 





More information about the llvm-commits mailing list