Displaying 20 results from an estimated 39 matches for "getdirectori".
Did you mean:
getdirectory
2011 Apr 27
1
[LLVMdev] LLVM internal getDirectory() for LexicalBlock debug information returns filename?
Hi,
For my project, I am using internal llvm class functions to print the
filename and directory associated with an instruction from the debug
information.
With a recent checkout of llvm and clang (svn revision 129445), the
following custom code (e.g. in a pass that prints directory info for
all instructions) returns the filename iso. directory whenever Scope
refers to a lexical block:
if (const
2012 Oct 04
2
[LLVMdev] question
That's because instructions have a location associated with them, not
a compile unit.
-eric
On Thu, Oct 4, 2012 at 12:46 PM, George Baah <georgebaah at gmail.com> wrote:
> I used DILocation instead of DICompileUnit and it works. Hmmm, interesting.
>
> George
>
> On Thu, Oct 4, 2012 at 1:33 AM, George Baah <georgebaah at gmail.com> wrote:
>>
>> Here is
2012 Oct 05
1
[LLVMdev] question
You should probably think of the DIFooBar constructors like reinterpret-casts, not
"go find the thing I actually want" functions. If you hand DICompileUnit() a node
that is not a compile-unit metadata node, it's not going to tell you that you goofed.
If you _did_ have a CU metadata node, then DICompileUnit's getDirectory() would
work just fine. But you don't.
--paulr
2012 Oct 05
0
[LLVMdev] question
Hmmm, but it has a getDirectory function.
-G
On Thu, Oct 4, 2012 at 3:50 PM, Eric Christopher <echristo at gmail.com> wrote:
> That's because instructions have a location associated with them, not
> a compile unit.
>
> -eric
>
> On Thu, Oct 4, 2012 at 12:46 PM, George Baah <georgebaah at gmail.com> wrote:
> > I used DILocation instead of DICompileUnit and
2012 Oct 04
2
[LLVMdev] question
Here is the code. I am running on llvm 3.1 on Lion (Mac 10.7.4)
*string getFileDirectory*(*const* Instruction &I){
MDNode *MD = I.getMetadata("dbg");
DICompileUnit compileUnit(MD);
return compileUnit.getDirectory().str();
}
George
On Wed, Oct 3, 2012 at 12:40 PM, Eric Christopher <echristo at gmail.com>wrote:
> Without knowing the code that you've written
2012 Oct 04
0
[LLVMdev] question
I used DILocation instead of DICompileUnit and it works. Hmmm, interesting.
George
On Thu, Oct 4, 2012 at 1:33 AM, George Baah <georgebaah at gmail.com> wrote:
> Here is the code. I am running on llvm 3.1 on Lion (Mac 10.7.4)
>
> *string getFileDirectory*(*const* Instruction &I){
>
> MDNode *MD = I.getMetadata("dbg");
>
> DICompileUnit
2012 Oct 03
2
[LLVMdev] question
Yeah, It looks like I am doing exactly what's in Dwarf*.cpp files, yet I am
getting blanks.
George
On Tue, Oct 2, 2012 at 2:10 PM, Eric Christopher <echristo at gmail.com> wrote:
> On Tue, Oct 2, 2012 at 11:00 AM, George Baah <georgebaah at gmail.com> wrote:
> > Hi Guys,
> > How does one get the directory of the compilation unit in llvm?
> > I am using
2015 Aug 06
2
[LLVMdev] DebugInfo from LLVM Instruction
Hi all,
I used to extract the debug information from an LLVM Instruction in the following way:
if (MDNode *N = I->getMetadata("dbg")) { // Here I is an LLVM instruction
DILocation Loc(N); // DILocation is in DebugInfo.h
unsigned Line = Loc.getLineNumber();
StringRef File = Loc.getFilename();
StringRef Dir = Loc.getDirectory();
}
As specified also at
2010 Jul 07
2
[LLVMdev] source line number for instruction
Hi,
I found the following at
http://llvm.org/docs/SourceLevelDebugging.html#ccxx_frontend:
if (MDNode *N = I->getMetadata("dbg")) { // Here I is an LLVM instruction
DILocation Loc(N); // DILocation is in DebugInfo.h
unsigned Line = Loc.getLineNumber();
StringRef File = Loc.getFilename();
StringRef Dir = Loc.getDirectory();
}
Does this also
2012 Oct 02
2
[LLVMdev] question
Hi Guys,
How does one get the directory of the compilation unit in llvm?
I am using DICompileUnit but for some reason I am getting blanks
for the directory name. Here is my code ...
MDNode *MD = I.getMetadata("dbg");
DICompileUnit compileUnit(MD);
*return* compileUnit.getDirectory().str();
Thanks
George
-------------- next part --------------
An HTML attachment was scrubbed...
2012 Oct 03
0
[LLVMdev] question
Without knowing the code that you've written and the IR that you're
running on I'm
not sure what I can do to help you.
-eric
On Wed, Oct 3, 2012 at 9:32 AM, George Baah <georgebaah at gmail.com> wrote:
> Yeah, It looks like I am doing exactly what's in Dwarf*.cpp files, yet I am
> getting blanks.
>
> George
>
> On Tue, Oct 2, 2012 at 2:10 PM, Eric
2012 Feb 28
0
[LLVMdev] Getting corresponding c-instruction line number along with ir-instruction in a function's CFG
Hi
I am not a good programmer but for my project i have to use llvm to generate CFG for c programs where i have a mapping from IR instruction in CFG to their respective c instruction. After surfing a in source of llvm i did the following change in printInstruction() function in llvm/lib/VMCore/AsmWriter.cpp file. .....void AssemblyWriter::printInstruction(const Instruction &I) { if
2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
Török Edwin wrote:
> On 03/16/2010 05:00 PM, John Criswell wrote:
>
>> Dear LLVMers,
>>
>> I'm updating some code to use the new LLVM 2.7 API. One piece of this
>> code uses the findStopPoint() function to find the source filename and
>> line number information of an instruction.
>>
>> What is the best way to do this under LLVM 2.7 now that
2011 Dec 19
2
[LLVMdev] DwarfDebug craziness
>From DwarfDebug.cpp:
>/// GetOrCreateSourceID - Look up the source id with the given directory and
>/// source file names. If none currently exists, create a new id and insert it
>/// in the SourceIds map. This can update DirectoryNames and SourceFileNames
>/// maps as well.
>unsigned DwarfDebug::GetOrCreateSourceID(StringRef FileName,
>
2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
Dear LLVMers,
I'm updating some code to use the new LLVM 2.7 API. One piece of this
code uses the findStopPoint() function to find the source filename and
line number information of an instruction.
What is the best way to do this under LLVM 2.7 now that the stop point
intrinsic has been removed? It appears that the debug information is
attached as metadata, but what is the easiest way
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
On 03/16/2010 05:00 PM, John Criswell wrote:
> Dear LLVMers,
>
> I'm updating some code to use the new LLVM 2.7 API. One piece of this
> code uses the findStopPoint() function to find the source filename and
> line number information of an instruction.
>
> What is the best way to do this under LLVM 2.7 now that the stop point
> intrinsic has been removed? It
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
On 03/16/2010 05:21 PM, John Criswell wrote:
> Török Edwin wrote:
>> On 03/16/2010 05:00 PM, John Criswell wrote:
>>
>>> Dear LLVMers,
>>>
>>> I'm updating some code to use the new LLVM 2.7 API. One piece of
>>> this code uses the findStopPoint() function to find the source
>>> filename and line number information of an
2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
Török Edwin wrote:
> [snip]
>>> Something like this (you can of course cache TheMetadata and MDDbgKind)
>>>
>>> llvm::MetadataContext *TheMetadata = M->getContext().getMetadata();
>>> MDDbgKind = TheMetadata->getMDKind("dbg");
>>> if (MDDbgKind) {
>>> if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) {
>>>
2010 Jul 07
0
[LLVMdev] source line number for instruction
On Jul 6, 2010, at 10:44 PM, Guoliang Jin wrote:
> I found the following at http://llvm.org/docs/SourceLevelDebugging.html#ccxx_frontend
> :
> if (MDNode *N = I->getMetadata("dbg")) { // Here I is an LLVM
> instruction
> DILocation Loc(N); // DILocation is in
> DebugInfo.h
> unsigned Line = Loc.getLineNumber();
> StringRef
2012 Oct 02
0
[LLVMdev] question
On Tue, Oct 2, 2012 at 11:00 AM, George Baah <georgebaah at gmail.com> wrote:
> Hi Guys,
> How does one get the directory of the compilation unit in llvm?
> I am using DICompileUnit but for some reason I am getting blanks
> for the directory name. Here is my code ...
>
> MDNode *MD = I.getMetadata("dbg");
>
> DICompileUnit compileUnit(MD);
>
> return