[llvm] r176166 - std::string to StringRef.
Nadav Rotem
nrotem at apple.com
Tue Feb 26 21:23:57 PST 2013
Author: nadav
Date: Tue Feb 26 23:23:56 2013
New Revision: 176166
URL: http://llvm.org/viewvc/llvm-project?rev=176166&view=rev
Log:
std::string to StringRef.
Modified:
llvm/trunk/lib/Target/X86/X86Subtarget.cpp
Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=176166&r1=176165&r2=176166&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Tue Feb 26 23:23:56 2013
@@ -332,9 +332,9 @@ void X86Subtarget::resetSubtargetFeature
"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::resetSubtargetFeature
}
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)\
More information about the llvm-commits
mailing list