[LLVMdev] patch for portability

Howard Hinnant hhinnant at apple.com
Wed Dec 2 06:54:26 PST 2009


I've completed a survey of llvm for unnecessary dependencies on libstdc++, and on conflicts with the upcoming C++0X standard, and am recommending several changes in the enclosed patch (created with svn diff).

Here is a summary of the patch:

---

#include <cstdlib> added to LinkAllVMCore.h and LinkAllCodegenComponents.h to declare std::getenv.

Changed next(...) to llvm::next(...) in many places.  I only changed those instances which were actually required to avoid ambiguity.  I left other calls to next() unqualified.  I do not have strong feelings about how this particular situation should be fixed, but this solution seems the simplest to me.  I do not anticipate a fix from the standards committee on this matter, though if anyone would like to pursue this course of action, I can certainly help with that.

#include "X86MachinefunctionInfo.h" added to X86COFFMachineModuleInfo.h to make X86MachineFunctionInfo a complete class before it is used to instantiate std::map.

#include <ostream> added to TargetData.cpp to bring these formatting prototypes into scope.

---

-Howard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.patch
Type: application/octet-stream
Size: 41192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091202/4ec9e063/attachment.obj>


More information about the llvm-dev mailing list