aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-02-27 05:23:56 +0000
committerNadav Rotem <nrotem@apple.com>2013-02-27 05:23:56 +0000
commite7c52282dd1b0f2d53c72c0036e28badb43221b6 (patch)
tree0d97c0e8bdd18e33eb1c4d3937f7af2cc6c13817
parentc1a2caf870ab37d887cb89f21ca59a2efde88928 (diff)
std::string to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176166 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86Subtarget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp
index 0f2c008ab9..ec8733fba6 100644
--- a/lib/Target/X86/X86Subtarget.cpp
+++ b/lib/Target/X86/X86Subtarget.cpp
@@ -332,9 +332,9 @@ void X86Subtarget::resetSubtargetFeatures(const MachineFunction *MF) {
"target-cpu");
Attribute FSAttr = FnAttrs.getAttribute(AttributeSet::FunctionIndex,
"target-features");
- std::string CPU =
- !CPUAttr.hasAttribute(Attribute::None) ?CPUAttr.getValueAsString() : "";
- std::string FS =
+ StringRef CPU =
+ !CPUAttr.hasAttribute(Attribute::None) ? CPUAttr.getValueAsString() : "";
+ StringRef FS =
!FSAttr.hasAttribute(Attribute::None) ? FSAttr.getValueAsString() : "";
if (!FS.empty()) {
initializeEnvironment();
@@ -343,7 +343,7 @@ void X86Subtarget::resetSubtargetFeatures(const MachineFunction *MF) {
}
void X86Subtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
- std::string CPUName = CPU;
+ StringRef CPUName = CPU;
if (!FS.empty() || !CPU.empty()) {
if (CPUName.empty()) {
#if defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86)\