[LLVMdev] patch for portability
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 41192 bytes
Desc: not available
More information about the llvm-dev