[llvm-commits] CVS: llvm/include/llvm/Target/SubtargetFeature.h TargetSubtarget.h
Jim Laskey
jlaskey at apple.com
Tue Dec 12 08:07:51 PST 2006
Changes in directory llvm/include/llvm/Target:
SubtargetFeature.h updated: 1.7 -> 1.8
TargetSubtarget.h updated: 1.2 -> 1.3
---
Log message:
Honor the command line specification for machine type.
---
Diffs of the changes: (+8 -0)
SubtargetFeature.h | 3 +++
TargetSubtarget.h | 5 +++++
2 files changed, 8 insertions(+)
Index: llvm/include/llvm/Target/SubtargetFeature.h
diff -u llvm/include/llvm/Target/SubtargetFeature.h:1.7 llvm/include/llvm/Target/SubtargetFeature.h:1.8
--- llvm/include/llvm/Target/SubtargetFeature.h:1.7 Fri Mar 24 04:00:56 2006
+++ llvm/include/llvm/Target/SubtargetFeature.h Tue Dec 12 10:07:33 2006
@@ -81,6 +81,9 @@
/// Set the CPU string. Replaces previous setting. Setting to "" clears CPU.
void setCPU(const std::string &String);
+ /// Get the CPU string.
+ const std::string &getCPU() const { return Features[0]; }
+
/// Setting CPU string only if no string is set.
void setCPUIfNone(const std::string &String);
Index: llvm/include/llvm/Target/TargetSubtarget.h
diff -u llvm/include/llvm/Target/TargetSubtarget.h:1.2 llvm/include/llvm/Target/TargetSubtarget.h:1.3
--- llvm/include/llvm/Target/TargetSubtarget.h:1.2 Mon Jul 11 21:41:19 2005
+++ llvm/include/llvm/Target/TargetSubtarget.h Tue Dec 12 10:07:33 2006
@@ -14,6 +14,8 @@
#ifndef LLVM_TARGET_TARGETSUBTARGET_H
#define LLVM_TARGET_TARGETSUBTARGET_H
+#include <string>
+
namespace llvm {
//===----------------------------------------------------------------------===//
@@ -25,10 +27,13 @@
class TargetSubtarget {
TargetSubtarget(const TargetSubtarget&); // DO NOT IMPLEMENT
void operator=(const TargetSubtarget&); // DO NOT IMPLEMENT
+ std::string CPU; // CPU name.
protected: // Can only create subclasses...
TargetSubtarget();
public:
virtual ~TargetSubtarget();
+ void setCPU(const std::string &C) { CPU = C; }
+ const std::string &getCPU() const { return CPU; }
};
} // End llvm namespace
More information about the llvm-commits
mailing list