Hi,
as asked on #llvm, the attached patch cleans up missing header
inclusions that work with libstdc++ due to namespace pollution.

Joerg
Index: include/llvm/ADT/ilist.h
===================================================================
--- include/llvm/ADT/ilist.h	(revision 121239)
+++ include/llvm/ADT/ilist.h	(working copy)
@@ -38,6 +38,7 @@
 #ifndef LLVM_ADT_ILIST_H
 #define LLVM_ADT_ILIST_H
 
+#include <algorithm>
 #include <cassert>
 #include <cstddef>
 #include <iterator>
Index: include/llvm/ADT/SmallVector.h
===================================================================
--- include/llvm/ADT/SmallVector.h	(revision 121239)
+++ include/llvm/ADT/SmallVector.h	(working copy)
@@ -20,6 +20,7 @@
 #include <cstddef>
 #include <cstdlib>
 #include <cstring>
+#include <iterator>
 #include <memory>
 
 #ifdef _MSC_VER
Index: include/llvm/ADT/DenseMap.h
===================================================================
--- include/llvm/ADT/DenseMap.h	(revision 121239)
+++ include/llvm/ADT/DenseMap.h	(working copy)
@@ -18,6 +18,7 @@
 #include "llvm/Support/PointerLikeTypeTraits.h"
 #include "llvm/Support/type_traits.h"
 #include "llvm/ADT/DenseMapInfo.h"
+#include <algorithm>
 #include <iterator>
 #include <new>
 #include <utility>
Index: include/llvm/ADT/SmallPtrSet.h
===================================================================
--- include/llvm/ADT/SmallPtrSet.h	(revision 121239)
+++ include/llvm/ADT/SmallPtrSet.h	(working copy)
@@ -16,6 +16,7 @@
 #define LLVM_ADT_SMALLPTRSET_H
 
 #include <cassert>
+#include <cstddef>
 #include <cstring>
 #include <iterator>
 #include "llvm/Support/DataTypes.h"
Index: lib/Target/TargetInstrInfo.cpp
===================================================================
--- lib/Target/TargetInstrInfo.cpp	(revision 121239)
+++ lib/Target/TargetInstrInfo.cpp	(working copy)
@@ -17,6 +17,7 @@
 #include "llvm/CodeGen/SelectionDAGNodes.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/Support/ErrorHandling.h"
+#include <cctype>
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//
Index: lib/Target/SubtargetFeature.cpp
===================================================================
--- lib/Target/SubtargetFeature.cpp	(revision 121239)
+++ lib/Target/SubtargetFeature.cpp	(working copy)
@@ -18,6 +18,7 @@
 #include <algorithm>
 #include <cassert>
 #include <cctype>
+#include <cstdlib>
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//
Index: lib/VMCore/LLVMContext.cpp
===================================================================
--- lib/VMCore/LLVMContext.cpp	(revision 121239)
+++ lib/VMCore/LLVMContext.cpp	(working copy)
@@ -19,6 +19,7 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/SourceMgr.h"
 #include "LLVMContextImpl.h"
+#include <cctype>
 using namespace llvm;
 
 static ManagedStatic<LLVMContext> GlobalContext;
Index: lib/AsmParser/LLLexer.cpp
===================================================================
--- lib/AsmParser/LLLexer.cpp	(revision 121239)
+++ lib/AsmParser/LLLexer.cpp	(working copy)
@@ -22,6 +22,7 @@
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/raw_ostream.h"
+#include <cctype>
 #include <cstdio>
 #include <cstdlib>
 #include <cstring>
Index: lib/MC/MCAsmStreamer.cpp
===================================================================
--- lib/MC/MCAsmStreamer.cpp	(revision 121239)
+++ lib/MC/MCAsmStreamer.cpp	(working copy)
@@ -24,6 +24,7 @@
 #include "llvm/Support/Format.h"
 #include "llvm/Support/FormattedStream.h"
 #include "llvm/Target/TargetLoweringObjectFile.h"
+#include <cctype>
 using namespace llvm;
 
 namespace {
Index: lib/MC/MCParser/AsmLexer.cpp
===================================================================
--- lib/MC/MCParser/AsmLexer.cpp	(revision 121239)
+++ lib/MC/MCParser/AsmLexer.cpp	(working copy)
@@ -15,6 +15,7 @@
 #include "llvm/Support/SMLoc.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/MC/MCAsmInfo.h"
+#include <cctype>
 #include <cerrno>
 #include <cstdio>
 #include <cstdlib>
Index: lib/MC/MCParser/AsmParser.cpp
===================================================================
--- lib/MC/MCParser/AsmParser.cpp	(revision 121239)
+++ lib/MC/MCParser/AsmParser.cpp	(working copy)
@@ -31,6 +31,7 @@
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetAsmParser.h"
+#include <cctype>
 #include <vector>
 using namespace llvm;
 
Index: lib/MC/MCSectionMachO.cpp
===================================================================
--- lib/MC/MCSectionMachO.cpp	(revision 121239)
+++ lib/MC/MCSectionMachO.cpp	(working copy)
@@ -10,6 +10,7 @@
 #include "llvm/MC/MCSectionMachO.h"
 #include "llvm/MC/MCContext.h"
 #include "llvm/Support/raw_ostream.h"
+#include <cctype>
 using namespace llvm;
 
 /// SectionTypeDescriptors - These are strings that describe the various section
Index: lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp
===================================================================
--- lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp	(revision 121239)
+++ lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp	(working copy)
@@ -26,6 +26,7 @@
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FormattedStream.h"
+#include <cctype>
 using namespace llvm;
 
 namespace {
Index: lib/CodeGen/SelectionDAG/TargetLowering.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/TargetLowering.cpp	(revision 121239)
+++ lib/CodeGen/SelectionDAG/TargetLowering.cpp	(working copy)
@@ -28,6 +28,7 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/MathExtras.h"
+#include <cctype>
 using namespace llvm;
 
 namespace llvm {
Index: lib/Bitcode/Writer/BitcodeWriter.cpp
===================================================================
--- lib/Bitcode/Writer/BitcodeWriter.cpp	(revision 121239)
+++ lib/Bitcode/Writer/BitcodeWriter.cpp	(working copy)
@@ -27,6 +27,7 @@
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Program.h"
+#include <cctype>
 using namespace llvm;
 
 /// These are manifest constants used by the bitcode writer. They do not need to
Index: lib/Support/Unix/Host.inc
===================================================================
--- lib/Support/Unix/Host.inc	(revision 121239)
+++ lib/Support/Unix/Host.inc	(working copy)
@@ -20,6 +20,7 @@
 #include "llvm/ADT/StringRef.h"
 #include "Unix.h"
 #include <sys/utsname.h>
+#include <cctype>
 #include <string>
 
 using namespace llvm;
Index: lib/Support/MemoryBuffer.cpp
===================================================================
--- lib/Support/MemoryBuffer.cpp	(revision 121239)
+++ lib/Support/MemoryBuffer.cpp	(working copy)
@@ -23,6 +23,7 @@
 #include <cstdio>
 #include <cstring>
 #include <cerrno>
+#include <new>
 #include <sys/types.h>
 #include <sys/stat.h>
 #if !defined(_MSC_VER) && !defined(__MINGW32__)
Index: lib/Support/FormattedStream.cpp
===================================================================
--- lib/Support/FormattedStream.cpp	(revision 121239)
+++ lib/Support/FormattedStream.cpp	(working copy)
@@ -13,6 +13,7 @@
 
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/FormattedStream.h"
+#include <algorithm>
 
 using namespace llvm;
 
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to