[cfe-commits] r154606 - /cfe/trunk/lib/Basic/Targets.cpp
Simon Atanasyan
satanasyan at mips.com
Thu Apr 12 12:59:24 PDT 2012
Author: atanasyan
Date: Thu Apr 12 14:59:24 2012
New Revision: 154606
URL: http://llvm.org/viewvc/llvm-project?rev=154606&view=rev
Log:
MIPS: Initialize MIPS CPU's name by default value.
Otherwise MipsTargetInfoBase::getDefaultFeatures() might return an invalid
features set with an empty feature name.
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=154606&r1=154605&r2=154606&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Apr 12 14:59:24 2012
@@ -3449,8 +3449,11 @@
std::string ABI;
public:
- MipsTargetInfoBase(const std::string& triple, const std::string& ABIStr)
+ MipsTargetInfoBase(const std::string& triple,
+ const std::string& ABIStr,
+ const std::string& CPUStr)
: TargetInfo(triple),
+ CPU(CPUStr),
SoftFloat(false), SingleFloat(false),
ABI(ABIStr)
{}
@@ -3575,7 +3578,7 @@
class Mips32TargetInfoBase : public MipsTargetInfoBase {
public:
Mips32TargetInfoBase(const std::string& triple) :
- MipsTargetInfoBase(triple, "o32") {
+ MipsTargetInfoBase(triple, "o32", "mips32") {
SizeType = UnsignedInt;
PtrDiffType = SignedInt;
}
@@ -3679,7 +3682,7 @@
virtual void SetDescriptionString(const std::string &Name) = 0;
public:
Mips64TargetInfoBase(const std::string& triple) :
- MipsTargetInfoBase(triple, "n64") {
+ MipsTargetInfoBase(triple, "n64", "mips64") {
LongWidth = LongAlign = 64;
PointerWidth = PointerAlign = 64;
LongDoubleWidth = LongDoubleAlign = 128;
More information about the cfe-commits
mailing list