[llvm-commits] [llvm-gcc-4.2] r80734 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Bill Wendling
isanbard at gmail.com
Tue Sep 1 16:05:43 PDT 2009
Author: void
Date: Tue Sep 1 18:05:43 2009
New Revision: 80734
URL: http://llvm.org/viewvc/llvm-project?rev=80734&view=rev
Log:
Remove <iostream> in favor of raw_ostream.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=80734&r1=80733&r2=80734&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Sep 1 18:05:43 2009
@@ -34,13 +34,14 @@
#include "llvm/Module.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/System/Host.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/DenseMap.h"
-#include <iostream>
#include "llvm-abi.h"
#include "llvm-internal.h"
@@ -792,9 +793,11 @@
switch (TREE_CODE(exp)) {
default:
- std::cerr << "Unhandled expression!\n"
- << "TREE_CODE: " << TREE_CODE(exp) << "\n";
- debug_tree(exp);
+ DEBUG({
+ llvm::errs() << "Unhandled expression!\n"
+ << "TREE_CODE: " << TREE_CODE(exp) << "\n";
+ debug_tree(exp);
+ });
abort();
// Control flow
@@ -988,8 +991,10 @@
switch (TREE_CODE(exp)) {
default:
- std::cerr << "Unhandled lvalue expression!\n";
- debug_tree(exp);
+ DEBUG({
+ errs() << "Unhandled lvalue expression!\n";
+ debug_tree(exp);
+ });
abort();
case PARM_DECL:
@@ -1071,7 +1076,7 @@
//===----------------------------------------------------------------------===//
void TreeToLLVM::TODO(tree exp) {
- std::cerr << "Unhandled tree node\n";
+ DEBUG(errs() << "Unhandled tree node\n");
if (exp) debug_tree(exp);
abort();
}
More information about the llvm-commits
mailing list