Move classes into anonymous namespaces. NFC.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 22 Sep 2019 09:28:47 +0000 (09:28 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 22 Sep 2019 09:28:47 +0000 (09:28 +0000)
llvm-svn: 372495

clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp

index 52d21a5..a824499 100644 (file)
@@ -662,8 +662,6 @@ private:
   void reportLeak(SymbolRef Sym, ExplodedNode *N, CheckerContext &C) const;
 };
 
-} // end anonymous namespace
-
 //===----------------------------------------------------------------------===//
 // Definition of MallocBugVisitor.
 //===----------------------------------------------------------------------===//
@@ -793,6 +791,8 @@ private:
   };
 };
 
+} // end anonymous namespace
+
 // A map from the freed symbol to the symbol representing the return value of
 // the free function.
 REGISTER_MAP_WITH_PROGRAMSTATE(FreeReturnValue, SymbolRef, SymbolRef)
index ea43db0..32cb97f 100644 (file)
@@ -674,6 +674,7 @@ unsigned HexagonInstrInfo::insertBranch(MachineBasicBlock &MBB,
   return 2;
 }
 
+namespace {
 class HexagonPipelinerLoopInfo : public TargetInstrInfo::PipelinerLoopInfo {
   MachineInstr *Loop, *EndLoop;
   MachineFunction *MF;
@@ -748,6 +749,7 @@ public:
 
   void disposed() override { Loop->eraseFromParent(); }
 };
+} // namespace
 
 std::unique_ptr<TargetInstrInfo::PipelinerLoopInfo>
 HexagonInstrInfo::analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const {
index ed9aae8..432d772 100644 (file)
@@ -8187,7 +8187,7 @@ SDValue PPCTargetLowering::LowerBITCAST(SDValue Op, SelectionDAG &DAG) const {
                      Op0.getOperand(1));
 }
 
-const SDValue *getNormalLoadInput(const SDValue &Op) {
+static const SDValue *getNormalLoadInput(const SDValue &Op) {
   const SDValue *InputLoad = &Op;
   if (InputLoad->getOpcode() == ISD::BITCAST)
     InputLoad = &InputLoad->getOperand(0);
index c33f0b3..f217bfb 100644 (file)
@@ -3930,6 +3930,7 @@ bool PPCInstrInfo::isBDNZ(unsigned Opcode) const {
   return (Opcode == (Subtarget.isPPC64() ? PPC::BDNZ8 : PPC::BDNZ));
 }
 
+namespace {
 class PPCPipelinerLoopInfo : public TargetInstrInfo::PipelinerLoopInfo {
   MachineInstr *Loop, *EndLoop, *LoopCount;
   MachineFunction *MF;
@@ -3996,6 +3997,7 @@ public:
     LoopCount->eraseFromParent();
   }
 };
+} // namespace
 
 std::unique_ptr<TargetInstrInfo::PipelinerLoopInfo>
 PPCInstrInfo::analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const {