about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorRobin Kruppe <robin.kruppe@gmail.com>2016-11-28 15:15:51 +0100
committerRobin Kruppe <robin.kruppe@gmail.com>2016-11-28 17:33:13 +0100
commit85dc08e525622365909cdaae27f4b89179321a92 (patch)
tree4bbe8a467e191e43c0f1c5a8d30be304a6a6c045 /src/test/run-pass/thinlto
parentc7ddb8946bf041d89ba109ec8dd754492de78606 (diff)
downloadrust-85dc08e525622365909cdaae27f4b89179321a92.tar.gz
rust-85dc08e525622365909cdaae27f4b89179321a92.zip
Don't assume llvm::StringRef is null terminated
StringRefs have a length and their contents are not usually null-terminated.
The solution is to either copy the string data (in rustc_llvm::diagnostic) or take the size into account (in LLVMRustPrintPasses).
I couldn't trigger a bug caused by this (apparently all the strings returned in practice are actually null-terminated) but this is more correct and more future-proof.
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions