projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OldPtr is llvm::Instruction. Remove unneeded cast<>.
[oota-llvm.git]
/
lib
/
Analysis
/
Trace.cpp
diff --git
a/lib/Analysis/Trace.cpp
b/lib/Analysis/Trace.cpp
index 31c7a19ff6ce790ae7ca439d9652d47202b70021..4c68322b82823041b8a7ecd9f078e7ac3025b0e1 100644
(file)
--- a/
lib/Analysis/Trace.cpp
+++ b/
lib/Analysis/Trace.cpp
@@
-16,9
+16,10
@@
//===----------------------------------------------------------------------===//
#include "llvm/Analysis/Trace.h"
//===----------------------------------------------------------------------===//
#include "llvm/Analysis/Trace.h"
-#include "llvm/Function.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/Assembly/Writer.h"
-#include "llvm/Support/Streams.h"
+#include "llvm/IR/Function.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/Support/raw_ostream.h"
using namespace llvm;
Function *Trace::getFunction() const {
using namespace llvm;
Function *Trace::getFunction() const {
@@
-31,9
+32,9
@@
Module *Trace::getModule() const {
/// print - Write trace to output stream.
///
/// print - Write trace to output stream.
///
-void Trace::print(
std::
ostream &O) const {
- Function *F = getFunction
();
- O << "; Trace from function " << F->getName
Str
() << ", blocks:\n";
+void Trace::print(
raw_
ostream &O) const {
+ Function *F = getFunction();
+ O << "; Trace from function " << F->getName() << ", blocks:\n";
for (const_iterator i = begin(), e = end(); i != e; ++i) {
O << "; ";
WriteAsOperand(O, *i, true, getModule());
for (const_iterator i = begin(), e = end(); i != e; ++i) {
O << "; ";
WriteAsOperand(O, *i, true, getModule());
@@
-42,9
+43,11
@@
void Trace::print(std::ostream &O) const {
O << "; Trace parent function: \n" << *F;
}
O << "; Trace parent function: \n" << *F;
}
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
/// dump - Debugger convenience method; writes trace to standard error
/// output stream.
///
void Trace::dump() const {
/// dump - Debugger convenience method; writes trace to standard error
/// output stream.
///
void Trace::dump() const {
- print(
cerr
);
+ print(
dbgs()
);
}
}
+#endif