From: Benjamin Kramer Date: Fri, 10 Feb 2017 22:26:35 +0000 (+0000) Subject: [InstCombine] Move class into anonymous namespace. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=53c27da76d919439867d4b5cdcfaeb8a13cc9e7d;p=llvm [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' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294794 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index dec998cca0b..d9e83f6516d 100644 --- a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -225,6 +225,7 @@ static Instruction *simplifyAllocaArraySize(InstCombiner &IC, AllocaInst &AI) { 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 WorkMap; InstCombiner ⁣ }; +} // end anonymous namespace void PointerReplacer::findLoadAndReplace(Instruction &I) { for (auto U : I.users()) {