Skip to content

Commit

Permalink
Updated to match latest LLVM changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
JP Bonn committed Jan 13, 2015
1 parent f5a2608 commit db40e7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
14 changes: 5 additions & 9 deletions lib/Basic/Targets.cpp
Expand Up @@ -1700,11 +1700,11 @@ namespace {
// LM32 abstract base class
class LM32TargetInfo : public TargetInfo {
static const char * const GCCRegNames[];
static const TargetInfo::GCCRegAlias GCCRegAliases[];
//static const TargetInfo::GCCRegAlias GCCRegAliases[];
std::vector<llvm::StringRef> AvailableFeatures;

public:
LM32TargetInfo(const std::string& triple) : TargetInfo(triple) {
LM32TargetInfo(const llvm::Triple &Triple) : TargetInfo(Triple) {
// PointerWidth = PointerAlign = 32;
// LongWidth = LongAlign = 32;
LongLongWidth = 64;
Expand Down Expand Up @@ -1768,18 +1768,14 @@ DescriptionString = "E-m:e-p:32:32:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:
return "";
}

bool setFeatureEnabled(llvm::StringMap<bool> &Features,
StringRef Name,
bool Enabled) const {
void setFeatureEnabled(llvm::StringMap<bool> &Features,
StringRef Name,
bool Enabled) const {
if(std::binary_search(AvailableFeatures.begin(), AvailableFeatures.end(),
Name)) {
Features[Name] = Enabled;
return true;
} else {
return false;
}
}

};

/// LM32TargetInfo::getTargetDefines - Return a set of the LM32-specific
Expand Down
7 changes: 1 addition & 6 deletions lib/CodeGen/TargetInfo.cpp
Expand Up @@ -6018,18 +6018,13 @@ void LM32ABIInfo::computeInfo(CGFunctionInfo &FI) const {
it->info = classifyArgumentType(it->type);
}

// Copied from MIPS
// FIXME: CHECK EXPANSION OF RETURN TYPES
ABIArgInfo LM32ABIInfo::classifyArgumentType(QualType Ty) const {
if (isAggregateTypeForABI(Ty)) {
// Ignore empty aggregates.
if (getContext().getTypeSize(Ty) == 0)
return ABIArgInfo::getIgnore();

// Records with non trivial destructors/constructors should not be passed
// by value.
if (isRecordWithNonTrivialDestructorOrCopyConstructor(Ty))
return ABIArgInfo::getIndirect(0, /*ByVal=*/false);

return ABIArgInfo::getIndirect(0);
}

Expand Down

0 comments on commit db40e7c

Please sign in to comment.