[LLVMdev] Adding type qualifies or property

xia_yimin xia_yimin at sina.com
Sun Jul 11 23:19:01 PDT 2004


Hi

Has anybody tell me how to create some new type qualifies in LVM? 
A type qualify, like "const" in C, is useful for program 
analysis. I hope that I can set/get the type qualify of any value 
in a program analysed.

Or, if I could add a property to the value class and set/get the 
property, it is same to add some new type qualifies. So, I simply 
insert a "int" private members in the value class in 
llvm/Value.h, write a pair of set/get methods for the value 
class, and initialize it in Value::Value(const Type *ty, ValueTy vty, const std::string &name). But, when I set the privative 
member of a value in my pass, analyse gives me:

analyze[0x83f0a00]
analyze[0x83f0c0c]
/lib/tls/libc.so.6[0x420275c8]
analyze(void std::_Destroy<llvm::Use>(llvm::Use*)+0x11)[0x8296921]
analyze(void std::__destroy_aux<llvm::Use*>(llvm::Use*, llvm::Use*, __false_type)+0x1c)[0x8297570]
analyze(void std::_Destroy<llvm::Use*>(llvm::Use*, llvm::Use*)+0x1a)[0x82968f0]
analyze(std::vector<llvm::Use, std::allocator<llvm::Use> >::~vector [in-charge]()+0x19)[0x82972fd]
analyze(llvm::User::~User [not-in-charge]()+0x1e)[0x8295b8c]
analyze(llvm::GlobalValue::~GlobalValue [not-in-charge]()+0x1a)[0x83ba8c0]
analyze(llvm::Function::~Function [in-charge deleting]()+0xb4)[0x8374768]
analyze(llvm::iplist<llvm::Function, llvm::ilist_traits<llvm::Function> >::erase(llvm::ilist_iterator<llvm::Function>)+0x38)[0x8288ba2]
analyze(llvm::iplist<llvm::Function, llvm::ilist_traits<llvm::Function> >::erase(llvm::ilist_iterator<llvm::Function>, llvm::ilist_iterator<llvm::Function>)+0x32)[0x83bb8d4]
analyze(llvm::iplist<llvm::Function, llvm::ilist_traits<llvm::Function> >::clear()+0x3d)[0x83bb5e1]
analyze(llvm::Module::~Module [in-charge]()+0x41)[0x83788b9]
analyze(main+0x5f7)[0x827151b]
/lib/tls/libc.so.6(__libc_start_main+0xe4)[0x42015574]
analyze(dlopen+0x41)[0x8269b75]

Has anyone encountered this? Any workarounds?

Thanks,

David xia


______________________________________

×¢²áÐÂÀË30Õ×Ãâ·ÑÓÊÏ䣨 http://mail.sina.com.cn/chooseMode.html £©

===================================================================
ÐÔ¸ÐС¿ã¿ã (http://ad4.sina.com.cn/wx/ads/zhuiyu_hprefresh1.html)




More information about the llvm-dev mailing list