mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
More migration to raw_ostream, the water has dried up around the iostream hole.
- Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77019 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "llvm/Transforms/Utils/Cloning.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include <set>
|
||||
using namespace llvm;
|
||||
@@ -71,7 +72,8 @@ bool Inliner::InlineCallIfPossible(CallSite CS, CallGraph &CG,
|
||||
if (Callee->use_empty() && (Callee->hasLocalLinkage() ||
|
||||
Callee->hasAvailableExternallyLinkage()) &&
|
||||
!SCCFunctions.count(Callee)) {
|
||||
DOUT << " -> Deleting dead function: " << Callee->getName() << "\n";
|
||||
DEBUG(errs() << " -> Deleting dead function: "
|
||||
<< Callee->getName() << "\n");
|
||||
CallGraphNode *CalleeNode = CG[Callee];
|
||||
|
||||
// Remove any call graph edges from the callee to its callees.
|
||||
@@ -133,7 +135,7 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) {
|
||||
for (unsigned i = 0, e = SCC.size(); i != e; ++i) {
|
||||
Function *F = SCC[i]->getFunction();
|
||||
if (F) SCCFunctions.insert(F);
|
||||
DOUT << " " << (F ? F->getName() : "INDIRECTNODE");
|
||||
DEBUG(errs() << " " << (F ? F->getName() : "INDIRECTNODE"));
|
||||
}
|
||||
|
||||
// Scan through and identify all call sites ahead of time so that we only
|
||||
|
||||
Reference in New Issue
Block a user