Displaying 20 results from an estimated 196 matches for "str1".
Did you mean:
str
2008 Jan 06
4
[LLVMdev] Another memory fun
hm.... I think, that is valid in c
but next code too doesn't works right:
; ModuleID = 'sample.lz'
@.str1 = internal global [6 x i8] c"world\00" ; <[6 x i8]*>
[#uses=1]
@.str2 = internal global [7 x i8] c"hello \00" ; <[7 x i8]*>
[#uses=1]
@.str7 = internal global [7 x i8] c"father\00" ; <[7 x i8]*>
[#uses=1]
@.str8 = internal...
2011 Aug 10
2
using if then statements in a dataframe
...if else" statements. For each row I need either a value or a blank/NA. Below is the series of if else statements I have been trying without success to integrate into a function such as "apply".
if (t1.secondstrongest<-13000) {NA} else
if (noise>-13000) {NA} else
if ((abs(value.str1-value.str2))==120) {NA} else
if ((abs(value.str1-value.str2))==180) {NA} else
if ((abs(value.str1-value.str2))==240) {NA} else
if (value.str1 ==300&&value.str2 ==0) {value.str1_adj+ bearingdiff} else
if (value.str1 ==0&&value.str2 ==360) {value.str1_adj+360 - bearingdiff} else
if (v...
2016 Nov 28
2
Looking for help with an ast matcher
...tr,
I think I found a working matcher: match
ifStmt(hasCondition(implicitCastExpr(hasImplicitDestinationType(isInteger()),
has(cxxMemberCallExpr(callee(cxxMethodDecl(hasName("compare"))),
hasArgument(0, declRefExpr().bind("str2")),
callee(memberExpr(has(declRefExpr().bind("str1"))))))))).bind("case1")
This one bind to both str1 and str2 in str1.compare(str2). I have included
a code segment below. I have attached a screenshot of this matcher working
from clang-query.
HOWEVER - when I try to use the matcher in clang-tidy it will not work. It
is because of th...
2008 Jan 06
0
[LLVMdev] Another memory fun
Zalunin Pavel wrote:
> hm.... I think, that is valid in c
[snip]
> I tried decompile code:
> main(int argc, char **argv) {
> char str1[] = "mother ";
> strcat(str1, "father");
> return 0;
> }
>
This is valid C but you forget that str1 is not magically expanded by
strcat. It starts out as, and remains a char array with 8 elements.
> decompiler gives to me code, in this code string " m...
2016 Nov 28
2
Looking for help with an ast matcher
...has(cxxMemberCallExpr(callee(cxxMethodDecl(hasName("
> compare"))),
> hasArgument(0,
> declRefExpr().bind("str2")),
> callee(memberExpr(has(
> declRefExpr().bind("str1"))))))))).bind("case1")
>
> And this is the AST part that we care about
> |-IfStmt 0x7fba9625f5e8 <line:8:5, line:10:5>
> | |-<<<NULL>>>
> | |-<<<NULL>>>
> | |-ImplicitCastExpr 0x7fba96258a80 <line:8:8, col:25> &...
2007 Dec 13
6
spliting strings ...
Hi everyone,
I have a vector of strings, each string made up by different number of words. I want to get a new vector which has only the first word of each string in the first vector. I came up with this:
str <- c('aaa bbb', 'cc', 'd eee aa', 'mmm o n')
str1 <- rep(1, length(str))
for (i in 1:length(str)) {
str1[i] <- strsplit(str, " ")[[i]][1]
}
str1
'aaa' 'cc' 'd' 'mmm'
Now, is there any way to do this simpler?
Thanks,
Monica
___________________________________________________________...
2008 Jan 06
4
[LLVMdev] Another memory fun
Hey again)
Now I have next code:
; ModuleID = 'sample.lz'
@.str1 = internal global [8 x i8] c" world!\00" ; <[8 x i8]*>
[#uses=1]
@.str2 = internal global [8 x i8] c"hello, \00" ; <[8 x i8]*>
[#uses=1]
@.str7 = internal global [21 x i8] c"welcome to out hall!\00" ;
<[21 x i8]*> [#uses=1]...
2008 Jan 06
0
[LLVMdev] Another memory fun
...path. A good approach is to
write out the correct code in C and then use llvm-gcc (or the demo page
at http://llvm.org/demo ) to see what it looks like in LLVM assembly.
Nick
Zalunin Pavel wrote:
> Hey again)
>
> Now I have next code:
>
> ; ModuleID = 'sample.lz'
> @.str1 = internal global [8 x i8] c" world!\00" ; <[8 x i8]*>
> [#uses=1]
> @.str2 = internal global [8 x i8] c"hello, \00" ; <[8 x i8]*>
> [#uses=1]
> @.str7 = internal global [21 x i8] c"welcome to out hall!\00"
> ; &l...
2016 Nov 27
2
Looking for help with an ast matcher
...fragment you want to match?
>
> Piotr
>
> 2016-11-26 22:27 GMT+01:00 Mads Ravn via llvm-dev <llvm-dev at lists.llvm.org
> >:
>
>> Hi,
>>
>> Hope this is the right channel for this question. I am trying to make an
>> ast matcher for clang-tidy to find str1.compare(str2), where both str1 and
>> str2 are std::string. I have this so far: http://i.imgur.com/sUma9WC.png .
>> But I am having a hard time finding a way to bind an id to the str1 part of
>> the expression.
>>
>> Can anyone help me out with an idea?
>>
>&g...
2013 Oct 24
2
[LLVMdev] LLVM use chains
Hi,
I have:
...
@.str1 = private unnamed_addr constant [21 x i8] c"Now f is a
function\0A\00", align 1
; Function Attrs: ssp uwtable
define i32 @_Z1fv() #2 {
entry:
%call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([21
x i8]* @.str1, i32 0, i32 0))
ret i32 0
}
Then I get after trying to...
2007 Oct 02
2
using sprintf with dates
hello,
Please help with using sprintf with character variables:
The following does not produce what i intended
foot=function(){
str1=format(Sys.Date,"%Y%m%d")
sprintf("99%-4s%s","nm",str1)
}
I wanted to have "99nm 20071002" as the output.
2013 Oct 24
2
[LLVMdev] LLVM use chains
On 10/24/13 2:13 AM, Rafael Espíndola wrote:
> On 23 October 2013 22:41, Vassil Vassilev <vvasilev at cern.ch> wrote:
>> Hi,
>> I have:
>> ...
>> @.str1 = private unnamed_addr constant [21 x i8] c"Now f is a
>> function\0A\00", align 1
>> ; Function Attrs: ssp uwtable
>> define i32 @_Z1fv() #2 {
>> entry:
>> %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([21 x
>> i8]* @.str1, i32 0,...
2013 Oct 24
0
[LLVMdev] LLVM use chains
On 23 October 2013 22:41, Vassil Vassilev <vvasilev at cern.ch> wrote:
> Hi,
> I have:
> ...
> @.str1 = private unnamed_addr constant [21 x i8] c"Now f is a
> function\0A\00", align 1
> ; Function Attrs: ssp uwtable
> define i32 @_Z1fv() #2 {
> entry:
> %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([21 x
> i8]* @.str1, i32 0, i32 0))
> ret i32 0...
2016 Nov 26
2
Looking for help with an ast matcher
Hi,
Hope this is the right channel for this question. I am trying to make an
ast matcher for clang-tidy to find str1.compare(str2), where both str1 and
str2 are std::string. I have this so far: http://i.imgur.com/sUma9WC.png .
But I am having a hard time finding a way to bind an id to the str1 part of
the expression.
Can anyone help me out with an idea?
Best regards,
Mads Ravn
-------------- next part ---------...
2008 Jan 06
0
[LLVMdev] Another memory fun
but why this code don't work:
; ModuleID = 'sample.lz'
@.str1 = internal global [6 x i8] c"world\00" ; <[6 x i8]*>
[#uses=1]
@.str2 = internal global [7 x i8] c"hello \00" ; <[7 x i8]*>
[#uses=1]
@.str7 = internal global [7 x i8] c"father\00" ; <[7 x i8]*>
[#uses=1]
@.str8 = internal...
2008 Jan 06
4
[LLVMdev] Another memory fun
Yes, I agree with you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080106/efb1c465/attachment.html>
2006 Nov 12
4
[LLVMdev] need help understanding getelementptr assembler instruction
I am trying to understand the hello word assember example. This is
my version:
%str1 = internal constant [13 x sbyte] c"Hello World\0a\00"
declare int %printf(sbyte*, ...)
implementation ; Functions:
int %main() {
%str2 = getelementptr [13 x sbyte]* %str1, long 0, long 0
call int(sbyte*, ...) *%printf(sbyte* %str2)
ret int 0
}
Why is getelementptr being given...
2010 Jun 30
2
string question
Hi,
How can I get double quotes embedded in the string?
Example:
--------------
str1 <- '"xyz"'
## desired output
# abc"xyz"
qr2 <- paste('abc',str1,sep='')
print(qr2)
-----------------
Actual output:
> [1] "abc\"str\""
I also tried putting an escape sequence before the quote, but couldn't get the
s...
2011 Feb 18
0
[LLVMdev] Adding "S" suffixed ARM/Thumb2 instructions
On Feb 17, 2011, at 10:35 PM, Вадим Марковцев wrote:
> Hello everyone,
>
> I've added the "S" suffixed versions of ARM and Thumb2 instructions to tablegen. Those are, for example, "movs" or "muls".
> Of course, some instructions have already had their twins, such as add/adds, and I leaved them untouched.
Adding separate "s" instructions is
2019 Mar 09
2
Cast a function parameter to GEP
...etOperand(i);
if(GetElementPtrInst* CI =
dyn_cast<GetElementPtrInst>(operand)) {
errs() << "GEP\n";
} else {
operand->dump();
}
}
The specific output is:
i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str1, i32 0, i32 0)
and str1 is @.str1 = private unnamed_addr constant [7 x i8] c"1.2.34\00",
align 1
I think it does not work because str1 is a "private constant". Is there a
way to solve it?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: &...