[PATCH] D13666: Add an (optional) identification block in the bitcode

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 15:29:22 PDT 2015


joker.eph added inline comments.

================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:3122
@@ +3121,3 @@
+            (Major == LLVM_VERSION_MAJOR && Minor > LLVM_VERSION_MINOR)) {
+          auto BitcodeMajor = std::to_string(Major);
+          auto BitcodeMinor = std::to_string(Minor);
----------------
ovyalov wrote:
> jroelofs wrote:
> > joker.eph wrote:
> > > ovyalov wrote:
> > > > Android builder is failing because of unsupported std::to_string - http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/2835/steps/build%20android/logs/stdio
> > > > Is it possible to replace this call here with std::ostringstream ?
> > > Sure, but do we know what makes it missing? The log says gcc 4.9.0, what is the C++ library used?
> > > It seems we need to add some documentation here: http://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library
> > > (unless I missed something there)
> > `Twine(Major)` would work here.
> Android NDK uses own version of STL that has some missed pieces - for example, in LLDB we emulate to_string in such way:
> 
> https://github.com/llvm-mirror/lldb/blob/ce972b9acd5e10f709b1733c73319839a6a997b5/include/lldb/Host/android/Android.h
OK I didn't know about the custom STL (I knew that it used a custom libc). 
Two actions seems appropriate to me here:

- submit a patch here: http://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library to require support for this STL.
- lldb to_string emulation could be moved in llvm itself. (There is already another place in llvm where to_string is used).

jroelofs: thanks for the suggestion, I didn't know Twine can do the to_string conversion implicitly. (and thanks ovyalov to have already implemented it).


http://reviews.llvm.org/D13666





More information about the llvm-commits mailing list