[cfe-commits] r72240 - /cfe/trunk/lib/Basic/Targets.cpp
Eli Friedman
eli.friedman at gmail.com
Thu May 21 18:12:58 PDT 2009
Author: efriedma
Date: Thu May 21 20:12:57 2009
New Revision: 72240
URL: http://llvm.org/viewvc/llvm-project?rev=72240&view=rev
Log:
A few more tweaks for Solaris; please correct me if it's wrong somehow.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=72240&r1=72239&r2=72240&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu May 21 20:12:57 2009
@@ -66,7 +66,9 @@
static void getSolarisDefines(const LangOptions &Opts, std::vector<char> &Defs) {
DefineStd(Defs, "sun", Opts);
DefineStd(Defs, "unix", Opts);
- Define(Defs, "__ELF__", "1");
+ Define(Defs, "__ELF__");
+ Define(Defs, "__svr4__");
+ Define(Defs, "__SVR4");
}
static void getFreeBSDDefines(const LangOptions &Opts, bool is64Bit,
@@ -892,7 +894,8 @@
public:
SolarisX86_32TargetInfo(const std::string& triple) : X86_32TargetInfo(triple) {
UserLabelPrefix = "";
- WCharType = WCharType = SignedLong;
+ WCharType = SignedLong;
+ // FIXME: WIntType should be SignedLong
}
virtual void getTargetDefines(const LangOptions &Opts,
std::vector<char> &Defines) const {
@@ -990,7 +993,6 @@
public:
SolarisX86_64TargetInfo(const std::string& triple) : X86_64TargetInfo(triple) {
UserLabelPrefix = "";
- WCharType = WCharType = SignedLong;
}
virtual void getTargetDefines(const LangOptions &Opts,
std::vector<char> &Defines) const {
@@ -1182,11 +1184,9 @@
}
virtual void getTargetDefines(const LangOptions &Opts,
std::vector<char> &Defines) const {
- // FIXME: This is missing a lot of important defines; some of the
- // missing stuff is likely to break system headers.
- Define(Defines, "__sparc");
- Define(Defines, "__sparc__");
+ DefineStd(Defines, "sparc", Opts);
Define(Defines, "__sparcv8");
+ Define(Defines, "__REGISTER_PREFIX__", "");
}
virtual void getTargetBuiltins(const Builtin::Info *&Records,
unsigned &NumRecords) const {
@@ -1275,6 +1275,9 @@
SparcV8TargetInfo(triple) {
SizeType = UnsignedInt;
PtrDiffType = SignedInt;
+ WCharType = SignedLong;
+ // FIXME: WIntType should be SignedLong
+ UserLabelPrefix = "";
}
virtual void getTargetDefines(const LangOptions &Opts,
More information about the cfe-commits
mailing list