[llvm-commits] [llvm-gcc-4.2] r79828 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Chris Lattner
sabre at nondot.org
Sat Aug 22 22:45:50 PDT 2009
Author: lattner
Date: Sun Aug 23 00:45:50 2009
New Revision: 79828
URL: http://llvm.org/viewvc/llvm-project?rev=79828&view=rev
Log:
add another layer of stream wrapper to work with the WriteAsOperand
on mainline that doesn't take a std::ostream anymore.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=79828&r1=79827&r2=79828&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Sun Aug 23 00:45:50 2009
@@ -1815,9 +1815,13 @@
/// print_llvm - Print the specified LLVM chunk like an operand, called by
/// print-tree.c for tree dumps.
void print_llvm(FILE *file, void *LLVM) {
+ // FIXME: oFILEstream can probably be removed in favor of a new raw_ostream
+ // adaptor which would be simpler and more efficient. In the meantime, just
+ // adapt the adaptor.
oFILEstream FS(file);
- FS << "LLVM: ";
- WriteAsOperand(FS, (Value*)LLVM, true, TheModule);
+ raw_os_ostream FSS(FS);
+ FSS << "LLVM: ";
+ WriteAsOperand(FSS, (Value*)LLVM, true, TheModule);
}
/// print_llvm_type - Print the specified LLVM type symbolically, called by
More information about the llvm-commits
mailing list