[PATCH] D15236: [ARM] Generate ABI_optimization_goals build attribute, as described in the ARM ARM.
A. Skrobov via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 7 06:09:41 PST 2015
tyomitch added inline comments.
================
Comment at: lib/Target/ARM/ARMAsmPrinter.cpp:622
@@ -582,3 +621,3 @@
} else
ATS.emitTextAttribute(ARMBuildAttrs::CPU_name, CPUString);
}
----------------
Here we're passing a reference to a local std::string to the ATS, which stays alive after this function returns, and keeps a reference to the deleted string.
================
Comment at: lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp:257
@@ -256,3 +256,3 @@
unsigned IntValue;
- StringRef StringValue;
+ std::string StringValue;
----------------
rengolin wrote:
> This looks like too big a hammer... Where is the pattern that breaks?
I'd argue that this was a bug that went unnoticed for a very long while... (see below)
http://reviews.llvm.org/D15236
More information about the llvm-commits
mailing list