opt -load Release/lib/Hello.dll -hello < ./hello.bc > /dev/null
opt.exe: Unknown command line argument '-hello'. Try:
'C:\MSYS\opt\llvm-2.7\bin\opt.exe -help'
make: *** [run] Error 1
Basically, it can't find the hello pass.
However, when I was trying to run the same code under Debian4-i386, I
got a totally opposite error: "Passes registered multiple times"
opt -load Release/lib/Hello.so -hello < test.bc > /dev/null
opt:
/autofs/steffan/a/a0/czhao/ResearchTools/LLVM/2.7/llvm-2.7/lib/VMCore/Pass.cpp:234:
void<unnamed>::PassRegistrar::RegisterPass(const llvm::PassInfo&):
Assertion `Inserted && "Pass registered multiple times!"' failed.
0 opt 0x085e6809
Stack dump:
0. Program arguments: opt -load Release/lib/Hello.so -hello
/bin/sh: line 1: 28292 Aborted opt -load
Release/lib/Hello.so -hello <test.bc >/dev/null
make: *** [run] Error 134
I think there is something very tricky here, but I can't figure out where.
Could somebody give me a hint?
Thank you
Chuck
_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> opt -load Release/lib/Hello.dll -hello < ./hello.bc > /dev/null
> opt.exe: Unknown command line argument '-hello'. Try:
>
> Could somebody give me a hint?
Loadable modules (e.g. passes) are not supported on windows. And will
probably never be.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
As an alternative, you can either:
1) Modify the opt program to statically link in the library implementing
your pass.
2) Create a new program (based on opt) that runs your pass on a
specified bitcode file.
SAFECode has done the latter; you can see what we did by checkout out
the SAFECode source code
(http://safecode.cs.illinois.edu/downloads.html) and looking at
tools/Sc/sc.cpp.
-- John T.
> And, is there a way to check whether a current LLVM build is miscompiled or
> not, by running some simple tests or scripts?
4.2.4 works fine for me