mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
The previous implementation of LLVM Streams wasn't removing symbols. This
one should. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32845 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -68,7 +68,7 @@ bool isCurrentDebugType(const char *Type);
|
|||||||
OStream &getErrorOutputStream(const char *DebugType);
|
OStream &getErrorOutputStream(const char *DebugType);
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#define DOUT cnull
|
#define DOUT OStream(0)
|
||||||
#else
|
#else
|
||||||
#define DOUT getErrorOutputStream(DEBUG_TYPE)
|
#define DOUT getErrorOutputStream(DEBUG_TYPE)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -39,11 +39,6 @@ namespace llvm {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// inline BaseStream &operator << (std::ios &(*Func)(std::ios&)) {
|
|
||||||
// if (Stream) *Stream << Func;
|
|
||||||
// return *this;
|
|
||||||
// }
|
|
||||||
|
|
||||||
template <typename Ty>
|
template <typename Ty>
|
||||||
BaseStream &operator << (const Ty &Thing) {
|
BaseStream &operator << (const Ty &Thing) {
|
||||||
if (Stream) *Stream << Thing;
|
if (Stream) *Stream << Thing;
|
||||||
@@ -68,7 +63,6 @@ namespace llvm {
|
|||||||
typedef BaseStream<std::istream> IStream;
|
typedef BaseStream<std::istream> IStream;
|
||||||
typedef BaseStream<std::stringstream> StringStream;
|
typedef BaseStream<std::stringstream> StringStream;
|
||||||
|
|
||||||
extern OStream cnull;
|
|
||||||
extern OStream cout;
|
extern OStream cout;
|
||||||
extern OStream cerr;
|
extern OStream cerr;
|
||||||
extern IStream cin;
|
extern IStream cin;
|
||||||
|
|||||||
@@ -69,8 +69,9 @@ bool llvm::isCurrentDebugType(const char *DebugType) {
|
|||||||
// program from having to have hundreds of static c'tor/d'tors for them.
|
// program from having to have hundreds of static c'tor/d'tors for them.
|
||||||
//
|
//
|
||||||
OStream &llvm::getErrorOutputStream(const char *DebugType) {
|
OStream &llvm::getErrorOutputStream(const char *DebugType) {
|
||||||
|
static OStream cnoout(0);
|
||||||
if (DebugFlag && isCurrentDebugType(DebugType))
|
if (DebugFlag && isCurrentDebugType(DebugType))
|
||||||
return cerr;
|
return cerr;
|
||||||
else
|
else
|
||||||
return cnull;
|
return cnoout;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
OStream llvm::cnull;
|
|
||||||
OStream llvm::cout(std::cout);
|
OStream llvm::cout(std::cout);
|
||||||
OStream llvm::cerr(std::cerr);
|
OStream llvm::cerr(std::cerr);
|
||||||
IStream llvm::cin(std::cin);
|
IStream llvm::cin(std::cin);
|
||||||
|
|||||||
Reference in New Issue
Block a user