[llvm-commits] [llvm] r134234 - in /llvm/trunk: include/llvm/MC/SubtargetFeature.h lib/MC/SubtargetFeature.cpp
Rafael Espindola
rafael.espindola at gmail.com
Thu Jun 30 21:40:50 PDT 2011
Author: rafael
Date: Thu Jun 30 23:40:50 2011
New Revision: 134234
URL: http://llvm.org/viewvc/llvm-project?rev=134234&view=rev
Log:
Fix use after free.
Modified:
llvm/trunk/include/llvm/MC/SubtargetFeature.h
llvm/trunk/lib/MC/SubtargetFeature.cpp
Modified: llvm/trunk/include/llvm/MC/SubtargetFeature.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/SubtargetFeature.h?rev=134234&r1=134233&r2=134234&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/SubtargetFeature.h (original)
+++ llvm/trunk/include/llvm/MC/SubtargetFeature.h Thu Jun 30 23:40:50 2011
@@ -77,7 +77,7 @@
explicit SubtargetFeatures(const StringRef Initial = "");
/// Features string accessors.
- StringRef getString() const;
+ std::string getString() const;
/// Adding Features.
void AddFeature(const StringRef String, bool IsEnabled = true);
Modified: llvm/trunk/lib/MC/SubtargetFeature.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/SubtargetFeature.cpp?rev=134234&r1=134233&r2=134234&view=diff
==============================================================================
--- llvm/trunk/lib/MC/SubtargetFeature.cpp (original)
+++ llvm/trunk/lib/MC/SubtargetFeature.cpp Thu Jun 30 23:40:50 2011
@@ -182,7 +182,7 @@
}
-StringRef SubtargetFeatures::getString() const {
+std::string SubtargetFeatures::getString() const {
return Join(Features);
}
More information about the llvm-commits
mailing list