[llvm] r294794 - [InstCombine] Move class into anonymous namespace. NFC.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 14:26:36 PST 2017


Author: d0k
Date: Fri Feb 10 16:26:35 2017
New Revision: 294794

URL: http://llvm.org/viewvc/llvm-project?rev=294794&view=rev
Log:
[InstCombine] Move class into anonymous namespace. NFC.

This is necessary to avoid warnings from GCC.
InstCombineLoadStoreAlloca.cpp:238:7: error: 'PointerReplacer' declared
with greater visibility than the type of its field 'PointerReplacer::IC'

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp?rev=294794&r1=294793&r2=294794&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp Fri Feb 10 16:26:35 2017
@@ -225,6 +225,7 @@ static Instruction *simplifyAllocaArrayS
   return nullptr;
 }
 
+namespace {
 // If I and V are pointers in different address space, it is not allowed to
 // use replaceAllUsesWith since I and V have different types. A
 // non-target-specific transformation should not use addrspacecast on V since
@@ -249,6 +250,7 @@ private:
   MapVector<Value *, Value *> WorkMap;
   InstCombiner &IC;
 };
+} // end anonymous namespace
 
 void PointerReplacer::findLoadAndReplace(Instruction &I) {
   for (auto U : I.users()) {




More information about the llvm-commits mailing list