search for: getfieldas

Displaying 5 results from an estimated 5 matches for "getfieldas".

Did you mean: getfield
2013 Nov 08
0
[LLVMdev] get source-level function signature?
...ode, I get the "int" type. I took a look at the implementation of the function, which is the following: /// getReturnTypeName - Subprogram return types are encoded either as /// DIType or as DICompositeType. StringRef getReturnTypeName() const { DICompositeType DCT(getFieldAs<DICompositeType>(7)); if (DCT.Verify()) { DIArray A = DCT.getTypeArray(); DIType T(A.getElement(0)); return T.getName(); } DIType T(getFieldAs<DIType>(7)); return T.getName(); } I also tried to get the types of parameters by c...
2011 Apr 27
1
[LLVMdev] LLVM internal getDirectory() for LexicalBlock debug information returns filename?
...etadata !1, i32 1} ; [ DW_TAG_lexical_block ] ... In llvm/Analysis/DebugInfo.h, I see some exception code in DISubProgram for LLVMDebugVersion7: StringRef getDirectory() const { if (getVersion() == llvm::LLVMDebugVersion7) return getCompileUnit().getFilename(); return getFieldAs<DIFile>(6).getDirectory(); } The DILexicalBlock code does not include such exceptions, but even if I try to add such code, the result is still the filename iso directory. I am at a loss how to address this. Any help would be greatly appreciated! Regards, Martijn Rutten
2015 Jul 27
0
[LLVMdev] [un]wrapping llvm:DITypeRef
...conversion operator DITypeRef converts from a DIType, which can contain only an MDNode*, but I need to construct a DITypeRef, which can contain a Metadata*. The constructor I need is here: template <typename T> class DIRef { template <typename DescTy> friend DescTy DIDescriptor::getFieldAs(unsigned Elt) const; friend DIScopeRef DIScope::getContext() const; friend DIScopeRef DIScope::getRef() const; friend class DIType; /// \brief Val can be either a MDNode or a MDString. /// /// In the latter, MDString specifies the type identifier. const Metadata *Val; expli...
2015 Jul 27
2
[LLVMdev] [un]wrapping llvm:DITypeRef
On 07/25/2015 08:57 PM, Andrew Wilkins wrote: > On Sun, 26 Jul 2015 at 06:48 Rodney M. Bates <rodney_bates at lcwb.coop <mailto:rodney_bates at lcwb.coop>> wrote: > > In trying to write a C binding for DIBuilder of llvm 3.6.1, I can't see a way to unwrap > llvm::DITypeRef, declared in include/llvm/IR/DebugInfo.h. This is a class with one > data member, a
2012 Feb 28
0
[LLVMdev] Getting corresponding c-instruction line number along with ir-instruction in a function's CFG
...er.o): In function `llvm::DILocation::getDirectory() const':/home/rangi/llvm/include/llvm/Analysis/DebugInfo.h:786: undefined reference to `llvm::DIScope::getDirectory() const'/home/rangi/llvm/build/Debug+Asserts/lib/libLLVMCore.a(AsmWriter.o): In function `llvm::DIScope llvm::DIDescriptor::getFieldAs<llvm::DIScope>(unsigned int) const':/home/rangi/llvm/include/llvm/Analysis/DebugInfo.h:77: undefined reference to `llvm::DIDescriptor::getDescriptorField(unsigned int) const' Plese tell me if what is missing and if this the right way to achive mapping.Thanks in advance Patreek...