Displaying 20 results from an estimated 3000 matches similar to: "Need help with windows build error and std::to_string"
2015 Nov 28
2
Need help with windows build error and std::to_string
Thanks. I
On Sat, Nov 28, 2015 at 11:44 AM, Benjamin Kramer <benny.kra at gmail.com>
wrote:
> On Sat, Nov 28, 2015 at 5:14 PM, Diego Novillo via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> >
> > I need to build a Twine with a double value, so I was using
> std::to_string,
> > but I'm getting "error: 'to_string' is not a member of
2017 May 17
2
Can we start using std::to_string?
Hi all,
I tried to use std::to_string somewhere and one of the bots yelled at
me [1] because it couldn't find it.
Searching through the mailing lists reveals a long stream of fixup
patches trying to avoid std::to_string, but there are uses of it in
tree in the AVR and Hexagon backends, libFuzzer and the Gold plugin. I
can only imagine they got away with it because the particular bots
that
2017 May 17
2
Can we start using std::to_string?
I'm fairly sure the problem is that we still support building with gcc
4.8.x, and that version of gcc did not have std::to_string. It is not
just an NDK issue.
-Hal
On 05/17/2017 06:05 AM, Pavel Labath via llvm-dev wrote:
> Hi Diana,
>
> I am responsible for that bot, and probably a great number of those fixups.
>
> The root of the problem is that android NDK comes with a
2013 May 02
4
[LLVMdev] int to StringRed conversion
Hello everyone,
I have an integer and I want to convert it to StringRef in order to set
metadata.
setMetadata->(StringRef, MDNode*);
It is there a native LLVM way to do it?
1. In the llvm::APSInt Class is toString() method, which seems it is not
for this purpose
2. itoa and string are not part of LLVM
3. stringstream is not part of LLVM
4. to_string is not part of LLVM
5. any casting method?
2012 Jul 18
2
[LLVMdev] Phi translation
I just accidently sent a partially complete email, so this contains the
rest (sorry!)
I'm working on translating llvm's optimized intermediate code to another
compiler's intermediate code, and I'm working on the PHI instruction.
Here's an example phi instruction to help explain what I'm trying to do:
%inc25 = phi i32 [ 1, %entry ], [ %inc, %for.body ]
What I would want to
2013 May 02
0
[LLVMdev] int to StringRed conversion
Hi,
I think you may try to use llvm::Twine(int). For example, to convert 30
to string, you can use:
Twine(30).str()
To convert the string back to integer, you can try the
StringRef::getAsInteger(unsigned, APInt &). For example:
APInt i;
str.getAsInteger(/*radix=*/ 10, /*output=*/ i);
Sincerely,
Logan
On Thu, May 2, 2013 at 9:53 PM, Alexandru Ionut Diaconescu <
2013 May 02
2
[LLVMdev] int to StringRed conversion
I think the better solution should be:
LLVMContext& C = is->getContext();
Value *values[] = {
ConstantInt::getSigned(Type::getInt64Ty(C), *scsr*),
MDString::get(C, *"path"*)
};
lnstr.setMetadata(*"your_analysis_name"*, MDNode::get(C, values));
So that you can take advantage of the type system of LLVM bitcode, and
don't have to cast the integers from/to strings
2012 Jul 18
1
[LLVMdev] (no subject)
I'm working on translating llvm's optimized intermediate code to another
compiler's intermediate code, and I'm working on the PHI instruction.
Here's an example phi instruction to help explain what I'm trying to do:
%inc25 = phi i32 [ 1, %entry ], [ %inc, %for.body ]
What I would want to do here is allocate some memory memory (i'm trying to
use %phi1 = alloca i32,
2006 Jul 14
3
override to_string for single attribute?
I have a model where I want to change the display for a single attribute
such that if the value is an integer, it displays with no decimal point
(e.g. "1"), but if it is non-integer, it displays with a decimal point
(e.g. "1.25").
The easiest way to do this seems to be if I could override the to_string
method for my_model.my_attribute.to_s. Is there a way to do this? Or
2016 Jul 06
3
GCC prerequisites for building LLVM head?
Is there is minimum required version for GCC to build LLVM from the head
revision?
I have GCC v4.9.3, but 'Tools/sancov/sancov.cc' won't build because
'std::to_string' does not exist. When running CMake it did not flag GCC
v4.9.3 as too old, and it is passing the '-std=gnu++11' option, but
apparently this version of GCC is not fully C++ 11 compliant, or at least
2013 May 02
0
[LLVMdev] int to StringRed conversion
The problem is that I want to pass only srsr which is an int. "marked" was
just an example :)
Thanks you!
On Thu, May 2, 2013 at 5:06 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote:
> I'm not familiar with this, but maybe you can try:
>
> StringRef tst = ("marked" + Twine(srsr)).str();
>
> It seems that you can't use integer as meta data
2016 Feb 19
3
raw_pwrite_stream to string or stdout?
TargetMachine::addPassesToEmitFile(..)
requires as its 2nd argument an raw_pwrite_stream.
Is it possible to create such a thing which either writes into a
standard string or streams to outs() ?
Thanks,
2013 May 02
0
[LLVMdev] int to StringRed conversion
Yes, it sounds good. I can try tomorrow.
Thank you for your advice !
On Thu, May 2, 2013 at 5:43 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote:
> I think the better solution should be:
>
>
> LLVMContext& C = is->getContext();
> Value *values[] = {
> ConstantInt::getSigned(Type::getInt64Ty(C), *scsr*),
> MDString::get(C, *"path"*)
> };
2014 Jan 15
0
[PATCH 4/4] hivex: python: Get rid of to_string function in test script
Since values are now returned as strings in Python2 and Python3,
treating them as bytes in Python 3 would break tests.
---
python/t/210-setvalue.py | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/python/t/210-setvalue.py b/python/t/210-setvalue.py
index 9d93519..2ee7ac5 100644
--- a/python/t/210-setvalue.py
+++ b/python/t/210-setvalue.py
@@ -47,20 +47,12 @@
2019 Jan 16
5
How to get the string representation of an instruction?
Hi,
I don't see a way to convert an Instruction to a string or const char
*, although '<<' works on it.
http://llvm.org/doxygen/classllvm_1_1Instruction.html
How to figure this out? Thanks.
--
Regards,
Peng
2011 Oct 12
0
[LLVMdev] Integer to string
On Oct 12, 2011, at 8:18 AM, Pablo Barrio wrote:
> Hi,
>
> I need to convert an integer into a string. I would normally do that in C++ by using the StringStream class, but the LLVM coding standards discourage using that class. The same coding standards suggest to use llvm:StringStream instead, but I cannot find that class anywhere; furthermore, the header file where it was supposed to
2013 Apr 09
2
[LLVMdev] get the identifies of the unnamed temporaries from the instruction of LLVM IR
hi Sean Silva:
i really appriciate for your reply.
but you konw that "dump()" instruction can print "%4" in the screen and each
time print the same name "%4" not "%5" or "%6" for the same unnamed value.
so there must be a way to determinate it. if "dump()" instruction can print
it on the screen, can i find some way to store it in a char *
2017 Sep 07
2
[ThinLTO] static library failure with object files with the same name
Hi Johan,
ld64 only calls functions from llvm/include/llvm-c/lto.h (defined
in llvm/tools/lto/lto.cpp)
For instance ThinLTOCodeGenerator::addModule is called
through thinlto_codegen_add_module().
Apple hasn't released the code for ld64 in Xcode 9 yet, did you check if it
is fixed in Xcode 9?
(I think I remember fixing it in ld64 but I'm not totally sure...).
>From what I can see
2013 Oct 10
2
[LLVMdev] [PATCH] R600/SI: Embed disassembly in ELF object
Hi,
This patch adds R600/SI disassembly text to compiled object files, when
a code dump is requested, to assist debugging in Mesa clients.
Here's an example of the output in a Mesa client with a corresponding
patch and RADEON_DUMP_SHADERS set:
Shader Disassembly:
S_WQM_B64 EXEC, EXEC ; BEFE0A7E
S_MOV_B32 M0, SGPR6 ; BEFC0306
2012 May 31
2
[LLVMdev] DFG of machine functions
Hi,
I am trying to generate the DFG of machine functions.
Initially, I added a pass to generate the DFG of LLVM IR functions. This
was based on the mail thread -
http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-September/025582.html. This
pass worked fine and I was able to generate DFG of LLVM IR functions.
Later, I ported the DFG pass code for machine functions. I ported the
InstIterator.h