<p dir="ltr">Thanks a lot for all these fixes. Do you have a script to hunt down unnecessary symbols?</p>
<div class="gmail_quote">On Mar 23, 2015 8:35 AM, "Benjamin Kramer" <<a href="mailto:benny.kra@googlemail.com">benny.kra@googlemail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: d0k<br>
Date: Mon Mar 23 07:30:58 2015<br>
New Revision: 232944<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=232944&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=232944&view=rev</a><br>
Log:<br>
Move private classes into anonymous namespaces<br>
<br>
NFC.<br>
<br>
Modified:<br>
    llvm/trunk/lib/CodeGen/LiveInterval.cpp<br>
    llvm/trunk/lib/CodeGen/RegisterPressure.cpp<br>
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br>
    llvm/trunk/lib/Support/GraphWriter.cpp<br>
    llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp<br>
    llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/LiveInterval.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveInterval.cpp?rev=232944&r1=232943&r2=232944&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveInterval.cpp?rev=232944&r1=232943&r2=232944&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/LiveInterval.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/LiveInterval.cpp Mon Mar 23 07:30:58 2015<br>
@@ -32,6 +32,7 @@<br>
 #include <algorithm><br>
 using namespace llvm;<br>
<br>
+namespace {<br>
 //===----------------------------------------------------------------------===//<br>
 // Implementation of various methods necessary for calculation of live ranges.<br>
 // The implementation of the methods abstracts from the concrete type of the<br>
@@ -293,6 +294,7 @@ private:<br>
     return I;<br>
   }<br>
 };<br>
+} // namespace<br>
<br>
 //===----------------------------------------------------------------------===//<br>
 //   LiveRange methods<br>
<br>
Modified: llvm/trunk/lib/CodeGen/RegisterPressure.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterPressure.cpp?rev=232944&r1=232943&r2=232944&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterPressure.cpp?rev=232944&r1=232943&r2=232944&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/RegisterPressure.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/RegisterPressure.cpp Mon Mar 23 07:30:58 2015<br>
@@ -304,6 +304,7 @@ static bool containsReg(ArrayRef<unsigne<br>
   return std::find(RegUnits.begin(), RegUnits.end(), RegUnit) != RegUnits.end();<br>
 }<br>
<br>
+namespace {<br>
 /// Collect this instruction's unique uses and defs into SmallVectors for<br>
 /// processing defs and uses in order.<br>
 ///<br>
@@ -354,6 +355,7 @@ protected:<br>
     }<br>
   }<br>
 };<br>
+} // namespace<br>
<br>
 /// Collect physical and virtual register operands.<br>
 static void collectOperands(const MachineInstr *MI,<br>
<br>
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=232944&r1=232943&r2=232944&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=232944&r1=232943&r2=232944&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Mar 23 07:30:58 2015<br>
@@ -9984,6 +9984,7 @@ SDValue DAGCombiner::TransformFPLoadStor<br>
   return SDValue();<br>
 }<br>
<br>
+namespace {<br>
 /// Helper struct to parse and store a memory address as base + index + offset.<br>
 /// We ignore sign extensions when it is safe to do so.<br>
 /// The following two expressions are not equivalent. To differentiate we need<br>
@@ -10071,6 +10072,7 @@ struct BaseIndexOffset {<br>
     return BaseIndexOffset(Base, Index, Off, IsIndexSignExt);<br>
   }<br>
 };<br>
+} // namespace<br>
<br>
 bool DAGCombiner::MergeStoresOfConstantsOrVecElts(<br>
                   SmallVectorImpl<MemOpLink> &StoreNodes, EVT MemVT,<br>
<br>
Modified: llvm/trunk/lib/Support/GraphWriter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/GraphWriter.cpp?rev=232944&r1=232943&r2=232944&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/GraphWriter.cpp?rev=232944&r1=232943&r2=232944&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Support/GraphWriter.cpp (original)<br>
+++ llvm/trunk/lib/Support/GraphWriter.cpp Mon Mar 23 07:30:58 2015<br>
@@ -98,6 +98,7 @@ static bool ExecGraphViewer(StringRef Ex<br>
   return false;<br>
 }<br>
<br>
+namespace {<br>
 struct GraphSession {<br>
   std::string LogBuffer;<br>
   bool TryFindProgram(StringRef Names, std::string &ProgramPath) {<br>
@@ -114,6 +115,7 @@ struct GraphSession {<br>
     return false;<br>
   }<br>
 };<br>
+} // namespace<br>
<br>
 static const char *getProgramName(GraphProgram::Name program) {<br>
   switch (program) {<br>
<br>
Modified: llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp?rev=232944&r1=232943&r2=232944&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp?rev=232944&r1=232943&r2=232944&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp (original)<br>
+++ llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp Mon Mar 23 07:30:58 2015<br>
@@ -1143,6 +1143,7 @@ SDNode *AArch64DAGToDAGISel::SelectPostS<br>
   return St;<br>
 }<br>
<br>
+namespace {<br>
 /// WidenVector - Given a value in the V64 register class, produce the<br>
 /// equivalent value in the V128 register class.<br>
 class WidenVector {<br>
@@ -1163,6 +1164,7 @@ public:<br>
     return DAG.getTargetInsertSubreg(AArch64::dsub, DL, WideTy, Undef, V64Reg);<br>
   }<br>
 };<br>
+} // namespace<br>
<br>
 /// NarrowVector - Given a value in the V128 register class, produce the<br>
 /// equivalent value in the V64 register class.<br>
<br>
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp?rev=232944&r1=232943&r2=232944&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp?rev=232944&r1=232943&r2=232944&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp Mon Mar 23 07:30:58 2015<br>
@@ -259,6 +259,7 @@ static bool isLoadFromConstantInitialize<br>
   return false;<br>
 }<br>
<br>
+namespace {<br>
 struct FindConstantPointers {<br>
   bool LoadCanBeConstantFolded;<br>
   bool IndexIsConstant;<br>
@@ -541,6 +542,7 @@ public:<br>
     return NumberOfOptimizedInstructions;<br>
   }<br>
 };<br>
+} // namespace<br>
<br>
 // Complete loop unrolling can make some loads constant, and we need to know if<br>
 // that would expose any further optimization opportunities.<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>