From 7bb9f500e24a7564d813363afab0185969ade64e Mon Sep 17 00:00:00 2001 From: Sameer Sahasrabuddhe Date: Wed, 15 Apr 2020 15:55:04 +0530 Subject: [PATCH] fix warning: specialization of template in different namespace This is related to commit 8c11bc0cd06ffc18786a1a51ee5ce5b1cc4923f6 which introduces the FixIrreducible pass. The warning seems hard to reproduce locally. The latest attempt ought to work. --- llvm/lib/Transforms/Utils/FixIrreducible.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Utils/FixIrreducible.cpp b/llvm/lib/Transforms/Utils/FixIrreducible.cpp index af5a99a..ef8b80c 100644 --- a/llvm/lib/Transforms/Utils/FixIrreducible.cpp +++ b/llvm/lib/Transforms/Utils/FixIrreducible.cpp @@ -236,8 +236,10 @@ static void createNaturalLoopInternal(LoopInfo &LI, DominatorTree &DT, #endif // EXPENSIVE_CHECKS } +namespace llvm { // Enable the graph traits required for traversing a Loop body. -template <> struct llvm::GraphTraits : LoopBodyTraits {}; +template <> struct GraphTraits : LoopBodyTraits {}; +} // namespace llvm // Overloaded wrappers to go with the function template below. BasicBlock *unwrapBlock(BasicBlock *B) { return B; } -- 2.7.4