[llvm-dev] Conflicts with custom passes
Kihong Heo via llvm-dev
llvm-dev at lists.llvm.org
Fri Jun 28 13:18:18 PDT 2019
Hi Tim,
Thanks for your suggestion!
I built LLVM with Debug and tried this with my custom pass.
But it has the following error
error: unable to load plugin '../../trace-extractor/build/TracePass.so': '../../trace-extractor/build/TracePass.so: undefined symbol: _ZTIN4llvm10ModulePassE’
Originally I used a builtin Clang in the system and it does not produce this issue.
When I search for this issue on Google, it seems to be relevant to “RTTI”. But as I know LLVM is built by default -fno-rtti. I also explicitly turned off it. Here is my cmake command:
$ cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_RTTI=OFF -DLLVM_ENABLE_PROJECTS=clang -G "Unix Makefiles" ../llvm
Any thought?
Best,
- Kihong
> On Jun 28, 2019, at 5:39 AM, Tim Northover <t.p.northover at gmail.com> wrote:
>
> Hi Kihong,
>
> On Fri, 28 Jun 2019 at 05:58, Kihong Heo via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> - Is there any guide line to write a custom pass to avoid such a conflict?
>
> The most likely cause for the error is that the IR you're generating
> is somehow invalid, and causing issues later.
>
> It also looks like you might have an LLVM built without assertions, so
> if that's the case you should fix that (e.g. CMake a debug build with
> -DCMAKE_BUILD_TYPE=Debug). That might cause an error immediately when
> you create the IR, or at should at least give more information about
> why SCCP is failing.
>
>> - Is there any existing framework to print out dynamic path in LLVM-IR format?
>
> Not as far as I know.
>
> Cheers.
>
> Tim.
More information about the llvm-dev
mailing list