Checking CS.getCalledFunction() == nullptr does not necessary indicate indirect call. We also need to check if CS.getCalledValue() is not a constant.
Details
Diff Detail
- Build Status
Buildable 3697 Build 3697: arc lint + arc unit
Event Timeline
| lib/Transforms/IPO/SampleProfile.cpp | ||
|---|---|---|
| 638 | Refactor the code in llvm/Analysis/IndirectCallSiteVisitor.h and reuse the indirect call site query routine. | |
| include/llvm/IR/CallSite.h | ||
|---|---|---|
| 121 | I used "stripPointerCasts" on getCalledValue() so that this is not needed any more. | |
| include/llvm/IR/CallSite.h | ||
|---|---|---|
| 121 | how is it so? | |
| include/llvm/IR/CallSite.h | ||
|---|---|---|
| 121 | stripPointerCasts comment says "Strip off pointer casts, all-zero GEPs, and aliases.", so for the constants (alias), it will give the actual function that it aliases to. | |
check if getCalledValue nullness?