From f8b80de1a952f14921c3137545e05575ea88e4ab Mon Sep 17 00:00:00 2001 From: Nadav Rotem Date: Wed, 27 Feb 2013 05:56:20 +0000 Subject: [PATCH] Revert r176166 because it broke one of the lit tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176171 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86Subtarget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index ec8733fba6f..0f2c008ab96 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"); - StringRef CPU = - !CPUAttr.hasAttribute(Attribute::None) ? CPUAttr.getValueAsString() : ""; - StringRef FS = + std::string CPU = + !CPUAttr.hasAttribute(Attribute::None) ?CPUAttr.getValueAsString() : ""; + std::string 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) { - StringRef CPUName = CPU; + std::string CPUName = CPU; if (!FS.empty() || !CPU.empty()) { if (CPUName.empty()) { #if defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86)\