similar to: [LLVMdev] Binary output to cout on Windows

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Binary output to cout on Windows"

2006 May 23
3
[LLVMdev] Binary output to cout on Windows
The solution (provided in Microsoft's documentation) is to add: #include <cstdio> #include <io.h> #include <fcntl.h> and run: int result = _setmode( _fileno(stdin), _O_BINARY ); if( result == -1 ) { std::cerr<<"Cannot set input mode to binary."<<std::endl; return 1; } result = _setmode( _fileno(stdout), _O_BINARY ); if( result == -1 ) {
2006 May 23
0
[LLVMdev] Binary output to cout on Windows
On Tue, 23 May 2006, Michael Smith wrote: > The solution (provided in Microsoft's documentation) is to add: > #include <cstdio> > #include <io.h> > #include <fcntl.h> > and run: > int result = _setmode( _fileno(stdin), _O_BINARY ); > if( result == -1 ) > { std::cerr<<"Cannot set input mode to binary."<<std::endl; return 1; >
2006 May 22
1
[LLVMdev] Binary output to cout on Windows
Hi Reid, llvm-as interprets "-" as using standard output (cout), so llvm-as < input.ll -o - | opt has the same behavior. You'll actually find a comment on it in llvm-as.cpp, so I guess I shouldn't hold out hope that there's a good way to do it. Michael -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of
2006 Nov 27
0
[LLVMdev] Change in I/O Streams
Hi all, There is going to be a sweeping change in how the I/O streams are used. We'll no longer be using std::cout, std::cerr, std::cin, etc. in each file. Instead, new LLVM streams will be used. The reason for this is because each "#include <iostream>" introduces an overhead in each compilation unit due to it needing to make sure that all of the std::c* streams are
2006 Dec 08
0
[LLVMdev] #include <iostream>
On Thu, 7 Dec 2006, Bill Wendling wrote: > With the newest patches to LLVM, there should be no reason for having > "#include <iostream>" in any library source code file, except for lib/ > Support/Streams.cpp. Please use the following instead: > > OLD NEW > --- --- > std::ostream llvm::OStream > std::istream
2006 Dec 07
7
[LLVMdev] #include <iostream>
Hi all, With the newest patches to LLVM, there should be no reason for having "#include <iostream>" in any library source code file, except for lib/ Support/Streams.cpp. Please use the following instead: OLD NEW --- --- std::ostream llvm::OStream std::istream llvm::IStream std::cerr llvm::cerr std::cerr llvm::cout
2003 Apr 29
4
Bug in g++ 2.95.4 (Pointer to member functions)
Hi, I think I have discovered a bug in FreeBSD 4.8-STABLE's system C++ compiler: % gcc -v % Using builtin specs. % gcc version 2.95.4 20020320 [FreeBSD] Here is a stripped down example that can be used to reproduce the bug: // ----------- begin bug.cpp ----------- #include <iostream> class Class { public: void M1 (void) { cout << "M1" << endl; }; void M2
2006 Dec 08
0
[LLVMdev] #include <iostream>
Bill Wendling wrote: > Hi all, > > With the newest patches to LLVM, there should be no reason for having > "#include <iostream>" in any library source code file, except for lib/ > Support/Streams.cpp. Please use the following instead: > > OLD NEW > --- --- > std::ostream llvm::OStream > std::istream
2006 Dec 11
0
[LLVMdev] #include <iostream>
Bill Wendling wrote: It seems that when compiling Debug versions of LLVM, we use stream manipulators (like std::hex) on the new LLVM streams, and doing so causes a compiler error when compiling LLVM with GCC 3.4.0. I commited a fix to work around the problem, but it seems to me it would be better if LLVM streams could support common stream manipulators. First, has anyone else experienced the
2013 Jun 24
2
[OT] bash here documents
Suppose I have this C++ program: #include <iostream> int main (int argc, char** argv) { while (1) { char cmd[80]; std::cin.getline(cmd, 80); std::cout << "response to " << cmd << std::endl; } } compiled by: c++ -o junk junk.cpp and I have this bash script: #!/bin/bash ./junk <<EOF blah bleh \cC EOF echo "Something
2017 Feb 09
1
[PATCH] Fix compile with cygwin
The underscores are wrong. The comment is also correct. Also remove the configure.ac option. Otherwise it tries to compile the windows unicode stuff which POSIX(cygwin) does not understand. --- configure.ac | 2 +- include/share/compat.h | 2 +- src/libFLAC/stream_decoder.c | 3 --- src/libFLAC/stream_encoder.c | 3 --- src/share/grabbag/file.c | 8 +------- 5 files
2015 Jan 16
2
Question on "single writer, multiple reader"
Hi, dear Xapianers! I've been using Xapian in my project recently. The feature "single writer, multiple reader" is one of my favorite, but currently I can't make it work. My goal is to add more documents to the database increamentally, while the Xapian search process is not stopped. I followed "quickstartindex.cc" and "quickstartsearch.cc" on
2013 Jan 14
2
[LLVMdev] Need some brief explanation about llvm::MemoryBuffer and llvm::SourceMgr
Hello list, I learned that under LLVM, #including of <iostream> is forbidden. Instead LLVM provides llvm::raw_ostream(for std::cout, std::cerr) and llvm::MemoryBuffer(for input stream). And using of llvm::raw_ostream is pretty easy but for me learning of how to use llvm::MemoryBuffer is pretty much difficult. I found a good sample code; utils/yaml2obj/yaml2obj.cpp. The function, main() in
2011 May 31
0
[LLVMdev] Expressiveness of column numbers in dwarf using clang 3.0?
On May 30, 2011, at 11:11 AM, trash-stuff at gmx.de wrote: > Hi all, > > I am processing DWARF line and column information in (x86 and ARM) executables in order to produce a mapping from the machine instructions back to the original source code (C/C++). Using the line numbers is quite straightforward ("libdwarf" [1] is doing the work me.) But when comparing the column numbers
2013 Jan 14
0
[LLVMdev] Need some brief explanation about llvm::MemoryBuffer and llvm::SourceMgr
Is this for user prompts, or just reading data from stdin? You can use MemoryBuffer::getSTDIN to read the contents of stdin into a memory buffer. Then you can get the data pointer and size and read it in. As far as I know, there is not a good way to implement user prompts with the LLVM APIs. On Mon, Jan 14, 2013 at 4:57 AM, Journeyer J. Joh <oosaprogrammer at gmail.com>wrote: >
2008 Jan 11
1
Patch for OS/2 STDIN/STDOUT
Hi, to make in/output on STDIN/STDOUT work on OS/2 this small patch is needed: ---cut--- diff -ruN o:src/speexdec.c src/speexdec.c --- o:src/speexdec.c 2007-12-08 05:01:08.000000000 +0100 +++ src/speexdec.c 2008-01-12 00:48:00.000000000 +0100 @@ -231,6 +231,8 @@ { #if defined WIN32 || defined _WIN32 _setmode(_fileno(stdout), _O_BINARY); +#elif defined OS2 +
2011 May 30
2
[LLVMdev] Expressiveness of column numbers in dwarf using clang 3.0?
Hi all, I am processing DWARF line and column information in (x86 and ARM) executables in order to produce a mapping from the machine instructions back to the original source code (C/C++). Using the line numbers is quite straightforward ("libdwarf" [1] is doing the work me.) But when comparing the column numbers (extracted from the DWARF line table) with the corresponding source
2006 May 22
1
[LLVMdev] Binary output to cout on Windows
I'm trying to resolve an issue that occurs in the native Windows implementation of LLVM (it probably doesn't occur in Cygwin, but I haven't checked). Namely, when calling llvm-as < input.ll > output.bc OR llvm-as < input.ll | opt outputting to cout is adding \r (the CR character) to newlines. This specifically causes problems in WriterContext::write(...)
2009 Aug 25
0
[LLVMdev] std::cout << *MyModule does not work anymore
On Mon, Aug 24, 2009 at 5:40 PM, Óscar Fuentes<ofv at wanadoo.es> wrote: > It seems that support for dumping text representation of LLVM objects to > standard channels and C++ output streams was removed. My guess is that > now we must use errs() instead of std::cerr, llvm::raw_fd_ostream > instead of std::ofstream, etc. Correct. std::ostream has been purged from LLVM; the only
2010 Apr 06
0
[LLVMdev] Get the loop trip count variable
Sorry, I could not the the loop trip count with getTripCount(). I used a simple program as a test case: ------------------------------------------------------ #include <stdio.h> int getV(int i) { return i * 2; } int main() { int num = 10; int sum=0; int i; for (i=0; i<num; i++) { sum += getV(i); } return 0;