Displaying 3 results from an estimated 3 matches for "tp60881p60883".
2013 Sep 01
0
[LLVMdev] Distinguishing Pointer Variable and Ordinary Variable
Check it's type to see if it's a pointer or not?
On 1 September 2013 12:31, Abhinash Jain <omnia at mailinator.com> wrote:
> C Code :-
> int main()
> {
> int a=10,c;
> int *b;
> c=20;
> *b=a;
> return 0;
> }
>
> IR of above code :-
> define i32 @main() #0 {
> entry:
> 1. %retval = alloca i32, align 4
> 2. %a = alloca i32, align 4
2013 Sep 01
2
[LLVMdev] Distinguishing Pointer Variable and Ordinary Variable
...it is only detecting i32** %b on line 8 of IR as a pointer type.
Whereas I also want to detect the i32* %1 on line 11 of IR as a pointer
type. So how can I do this??
--
View this message in context: http://llvm.1065342.n5.nabble.com/Distinguishing-Pointer-type-variable-and-Ordinary-Variable-tp60881p60883.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
2013 Sep 01
2
[LLVMdev] Distinguishing Pointer Variable and Ordinary Variable
C Code :-
int main()
{
int a=10,c;
int *b;
c=20;
*b=a;
return 0;
}
IR of above code :-
define i32 @main() #0 {
entry:
1. %retval = alloca i32, align 4
2. %a = alloca i32, align 4
3. %c = alloca i32, align 4
4. %b = alloca i32*, align 8
5. store i32 0, i32* %retval
6. store i32 10, i32* %a, align 4
7. store i32 20, i32* %c, align 4
8. %0 = load i32* %a, align 4
9. %1 = load i32** %b,