From d34e60ca8532511acb8c93ef26297e349fbec86a Mon Sep 17 00:00:00 2001 From: Nicola Zaghen Date: Mon, 14 May 2018 12:53:11 +0000 Subject: Rename DEBUG macro to LLVM_DEBUG. The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g' - git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM - Manual change to APInt - Manually chage DOCS as regex doesn't match it. In the transition period the DEBUG() macro is still present and aliased to the LLVM_DEBUG() one. Differential Revision: https://reviews.llvm.org/D43624 llvm-svn: 332240 --- llvm/lib/Analysis/LazyCallGraph.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'llvm/lib/Analysis/LazyCallGraph.cpp') diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp index 420a71c9ffe..c001f55bb62 100644 --- a/llvm/lib/Analysis/LazyCallGraph.cpp +++ b/llvm/lib/Analysis/LazyCallGraph.cpp @@ -66,15 +66,15 @@ static void addEdge(SmallVectorImpl &Edges, if (!EdgeIndexMap.insert({&N, Edges.size()}).second) return; - DEBUG(dbgs() << " Added callable function: " << N.getName() << "\n"); + LLVM_DEBUG(dbgs() << " Added callable function: " << N.getName() << "\n"); Edges.emplace_back(LazyCallGraph::Edge(N, EK)); } LazyCallGraph::EdgeSequence &LazyCallGraph::Node::populateSlow() { assert(!Edges && "Must not have already populated the edges for this node!"); - DEBUG(dbgs() << " Adding functions called by '" << getName() - << "' to the graph.\n"); + LLVM_DEBUG(dbgs() << " Adding functions called by '" << getName() + << "' to the graph.\n"); Edges = EdgeSequence(); @@ -152,8 +152,8 @@ static bool isKnownLibFunction(Function &F, TargetLibraryInfo &TLI) { } LazyCallGraph::LazyCallGraph(Module &M, TargetLibraryInfo &TLI) { - DEBUG(dbgs() << "Building CG for module: " << M.getModuleIdentifier() - << "\n"); + LLVM_DEBUG(dbgs() << "Building CG for module: " << M.getModuleIdentifier() + << "\n"); for (Function &F : M) { if (F.isDeclaration()) continue; @@ -168,8 +168,8 @@ LazyCallGraph::LazyCallGraph(Module &M, TargetLibraryInfo &TLI) { // External linkage defined functions have edges to them from other // modules. - DEBUG(dbgs() << " Adding '" << F.getName() - << "' to entry set of the graph.\n"); + LLVM_DEBUG(dbgs() << " Adding '" << F.getName() + << "' to entry set of the graph.\n"); addEdge(EntryEdges.Edges, EntryEdges.EdgeIndexMap, get(F), Edge::Ref); } @@ -181,8 +181,9 @@ LazyCallGraph::LazyCallGraph(Module &M, TargetLibraryInfo &TLI) { if (Visited.insert(GV.getInitializer()).second) Worklist.push_back(GV.getInitializer()); - DEBUG(dbgs() << " Adding functions referenced by global initializers to the " - "entry set.\n"); + LLVM_DEBUG( + dbgs() << " Adding functions referenced by global initializers to the " + "entry set.\n"); visitReferences(Worklist, Visited, [&](Function &F) { addEdge(EntryEdges.Edges, EntryEdges.EdgeIndexMap, get(F), LazyCallGraph::Edge::Ref); -- cgit v1.2.3