[LLVMdev] llvm-tv

AbhishekR abhishekr1982 at gmail.com
Wed Jun 13 15:40:15 PDT 2012


I didn't get much time to work on it after that. Today, I had a look at it.
I included a workaround for that weird marco incompatibility error between
LLVM and wxWidgets. I just commented out the line - "#define _(s)
wxGetTranslation(wxT(s))" in wx/intl.h and it built successfully.

I fixed issues with lib/Snapshot/WriteSnapshot.cpp. Now opt-snap tool can
capture snapshots.

If I run llvm-tv.exe without any snapshots in the
/tmp/llvm-tv-*username*/snapshots
folder, at least the LLVM Visualizer window pops up. But, with the
snapshots in the folder, it gives segmentation fault after showing
"Processing: /tmp/llvm-tv-*username*/snapshots/*.bc" for each snapshot
bitcode file.

If someone is interested in helping to fix the snapshot processing part by
llvm-tv, I can share the code. Please let me know.


On Wed, Jun 6, 2012 at 1:21 AM, AbhishekR <abhishekr1982 at gmail.com> wrote:

> I fixed all the other build errors. This is the only one pending.
>
> On Tue, Jun 5, 2012 at 8:33 PM, AbhishekR <abhishekr1982 at gmail.com> wrote:
>
>> I fixed most of the errors.
>>
>> There is a weird error I am seeing and seems to be some incompatibility
>> in expanding macros between FileSystem.h in LLVM and intl.h in wxWidgets.
>> Any idea how to fix this?
>>
>> In file included from
>> /home/arhishee/work/llvm-tv/llvm-tv/tools/llvm-tv/GraphDrawer.cpp:4:
>> In file included from
>> /home/arhishee/work/llvm-tv/llvm30/include/llvm/Support/FileUtilities.h:18:
>> In file included from
>> /home/arhishee/work/llvm-tv/llvm30/include/llvm/Support/FileSystem.h:34:
>> /home/arhishee/work/llvm-tv/llvm30/include/llvm/Support/system_error.h:895:38:
>> error: use of undeclared identifier 'Lv'
>>   explicit windows_error(int v) : v_(_(v)) {}
>>                                      ^
>> /usr/local/include/wx-2.8/wx/intl.h:48:55: note: expanded from:
>>     #define _(s)                     wxGetTranslation(wxT(s))
>>                                                       ^
>> /usr/local/include/wx-2.8/wx/wxchar.h:235:36: note: expanded from:
>>     #define wxT(x) wxCONCAT_HELPER(L, x)
>>                                    ^
>> /usr/local/include/wx-2.8/wx/cpp.h:17:37: note: expanded from:
>> #define wxCONCAT_HELPER(text, line) text ## line
>>                                     ^
>> <scratch space>:61:1: note: expanded from:
>> Lv
>> ^
>> In file included from
>> /home/arhishee/work/llvm-tv/llvm-tv/tools/llvm-tv/GraphDrawer.cpp:4:
>> In file included from
>> /home/arhishee/work/llvm-tv/llvm30/include/llvm/Support/FileUtilities.h:18:
>> /home/arhishee/work/llvm-tv/llvm30/include/llvm/Support/FileSystem.h:60:34:
>> error: use of undeclared identifier 'Lv'
>>   explicit file_type(int v) : v_(_(v)) {}
>>                                  ^
>> /usr/local/include/wx-2.8/wx/intl.h:48:55: note: expanded from:
>>     #define _(s)                     wxGetTranslation(wxT(s))
>>                                                       ^
>> /usr/local/include/wx-2.8/wx/wxchar.h:235:36: note: expanded from:
>>     #define wxT(x) wxCONCAT_HELPER(L, x)
>>                                    ^
>> /usr/local/include/wx-2.8/wx/cpp.h:17:37: note: expanded from:
>> #define wxCONCAT_HELPER(text, line) text ## line
>>                                     ^
>> <scratch space>:61:1: note: expanded from:
>> Lv
>> ^
>> In file included from
>> /home/arhishee/work/llvm-tv/llvm-tv/tools/llvm-tv/GraphDrawer.cpp:4:
>> In file included from
>> /home/arhishee/work/llvm-tv/llvm30/include/llvm/Support/FileUtilities.h:18:
>> /home/arhishee/work/llvm-tv/llvm30/include/llvm/Support/FileSystem.h:76:36:
>> error: use of undeclared identifier 'Lv'
>>   explicit copy_option(int v) : v_(_(v)) {}
>>                                    ^
>> /usr/local/include/wx-2.8/wx/intl.h:48:55: note: expanded from:
>>     #define _(s)                     wxGetTranslation(wxT(s))
>>                                                       ^
>> /usr/local/include/wx-2.8/wx/wxchar.h:235:36: note: expanded from:
>>     #define wxT(x) wxCONCAT_HELPER(L, x)
>>                                    ^
>> /usr/local/include/wx-2.8/wx/cpp.h:17:37: note: expanded from:
>> #define wxCONCAT_HELPER(text, line) text ## line
>>                                     ^
>> <scratch space>:61:1: note: expanded from:
>> Lv
>> ^
>>
>>
>> On Tue, Jun 5, 2012 at 6:00 PM, John Criswell <criswell at illinois.edu>wrote:
>>
>>>  On 6/5/12 7:45 PM, AbhishekR wrote:
>>>
>>> Thanks John. I verified that and poolalloc builds with LLVM 3.0. I used
>>> clang for compiling wxWidgets, LLVM 3.0 and poolalloc.
>>>
>>>  But llvm-tv build still gives build error. I take it that llvm-tv is
>>> still incompatible with these versions of poolalloc and LLVM 3.0. I think
>>> the code is manageable - couple of files in lib,include and some 30 odd
>>> small files in tools directory. I'll have a look at the code to sort out
>>> the build errors.
>>>
>>>
>>> The llvm-tv project hasn't been used in a long, long time.  In fact, I
>>> don't think anyone has used it or worked on it since LLVM 2.0 was released
>>> back in 2007.
>>>
>>> If you want to update llvm-tv to LLVM 3.0 (or, better yet, LLVM 3.1),
>>> that would be cool, but just be aware that it's a significant project that
>>> you'll have to do on your own (the LLVM internal API has changed *a lot*
>>> since llvm-tv was written).  I also don't know how much demand there is for
>>> a tool like llvm-tv.
>>>
>>> That said, people on llvm-dev are usually happy to answer questions on
>>> the LLVM 3.1/LLVM mainline API.
>>>
>>>
>>>
>>>  Have you tried compiling/using llvm-tv with these versions of
>>> poolalloc and LLVM-3.0?
>>>
>>>  Here is the llvm-tv build error -
>>>
>>>  /home/arhishee/work/llvm-tv/llvm-tv/lib/Snapshot/FileUtils.cpp:32:5:
>>> error: use of undeclared identifier 'perror'
>>>     perror("scandir");
>>>     ^
>>> /home/arhishee/work/llvm-tv/llvm-tv/lib/Snapshot/FileUtils.cpp:50:5:
>>> error: use of undeclared identifier 'perror'
>>>     perror("scandir");
>>>
>>>
>>> The perror() function is a Unix/Posix function.  The llvm-tv code is
>>> probably assuming that some LLVM header files #includes the definition of
>>> it.  This was true in LLVM 1.x; it's not true now.  You'll have to search
>>> out and fix all these issues if you work on llvm-tv.
>>>
>>> As an FYI, I never worked on llvm-tv.  I just made the comment about
>>> poolalloc in the case that your primary interest was in understanding the
>>> poolalloc transform.
>>>
>>> -- John T.
>>>
>>>
>>
>>
>> --
>> Regards,
>> Abhishek
>>
>
>
>
> --
> Regards,
> Abhishek
>



-- 
Regards,
Abhishek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120613/1198c0b6/attachment.html>


More information about the llvm-dev mailing list