Displaying 3 results from an estimated 3 matches for "handlemoviattr".
2016 Nov 25
2
Translation of custom attribute (defined for variables) from clang to llvm
...without any warnings from
clang), for example in following snippet.
#define NEWATTR __attribute__((moviAttr(1)))
int main()
{
NEWATTR volatile unsigned int a = 5;
volatile unsigned int *p;
p = &a;
return (a+*p);
}
and actually when I Dump the declaration, after adding the attribute in
handleMoviAttr() function in SemaDeclAttr.cpp as shown in following
snippet
D->addAttr(::new (S.Context)moviAttrAttr(Attr.getRange(), S.Context,
Val, Attr.getAttributeSpellingListIndex()));
D->dump();
It is dumped by clang with following output
VarDecl 0x440c698 <file.c:6:17, line:10:32> col:32 a...
2016 Nov 25
3
Translation of custom attribute (defined for variables) from clang to llvm
...bute__((moviAttr(1)))
>>
>> int main()
>> {
>> NEWATTR volatile unsigned int a = 5;
>> volatile unsigned int *p;
>> p = &a;
>> return (a+*p);
>> }
>>
>> and actually when I Dump the declaration, after adding the attribute
>> in handleMoviAttr() function in SemaDeclAttr.cpp as shown in
>> following snippet
>>
>> D->addAttr(::new (S.Context)moviAttrAttr(Attr.getRange(), S.Context,
>> Val, Attr.getAttributeSpellingListIndex()));
>> D->dump();
>>
>> It is dumped by clang with following outpu...
2016 Nov 28
2
Translation of custom attribute (defined for variables) from clang to llvm
...>> NEWATTR volatile unsigned int a = 5;
>> >> volatile unsigned int *p;
>> >> p = &a;
>> >> return (a+*p);
>> >> }
>> >>
>> >> and actually when I Dump the declaration, after adding the attribute
>> >> in handleMoviAttr() function in SemaDeclAttr.cpp as shown in
>> >> following snippet
>> >>
>> >> D->addAttr(::new (S.Context)moviAttrAttr(Attr.getRange(), S.Context,
>> >> Val, Attr.getAttributeSpellingListIndex()));
>> >> D->dump();
>> >>...