[cfe-dev] Duplicate TM->addAnalysisPasses() calls in AddEmitPasses()

Yaron Keren yaron.keren at gmail.com
Sat Aug 2 13:47:16 PDT 2014


Hi,

In clang/lib/CodeGen/BackendUtil.cpp, EmitAssemblyHelper::AddEmitPasses()
calls TM->addAnalysisPasses(*PM) in line 502 and later
calls TM->addPassesToEmitFile() in line 521.

In LLVMTargetMachine.cpp:138, TM->addPassesToEmitFile() calls (local, line
84) addPassesToGenerateCode() which also calls TM->addAnalysisPasses() in
line 91.

So we end with two calls to addAnalysisPasses().

Is there a purpose to the duplicate call or just a bug?

Yaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140802/4bae5a0b/attachment.html>


More information about the cfe-dev mailing list