LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 30662 - "-mllvm -print-before=<pass_name>" not working when invoked with clang
Summary: "-mllvm -print-before=<pass_name>" not working when invoked with clang
Status: CONFIRMED
Alias: None
Product: clang
Classification: Unclassified
Component: Driver (show other bugs)
Version: 10.0
Hardware: PC Windows NT
: P normal
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-11 16:14 PDT by Sumanth Gundapaneni
Modified: 2020-10-14 22:18 PDT (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sumanth Gundapaneni 2016-10-11 16:14:58 PDT
$ touch /tmp/test.c  && ./bin/clang -mllvm -print-before=verify -c -emit-llvm /tmp/1.c

clang (LLVM option parsing): for the -print-before option: Cannot find option named 'verify'!

Looks like the passes were not registered by the time we parse the command line when invoked with clang. However, the option works perfectly fine with "llc". FYI, same is the case with "-mllvm print-after=<pass_name>
Comment 1 Nabeel Omer 2020-09-30 08:09:19 PDT
This bug exists in Clang-10, Clang-11 and Clang master.
Comment 2 Fangrui Song 2020-10-14 22:18:17 PDT
This has been reported here
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20130617/178073.html