LLVM  12.0.0git
Functions
WinCFGuard.cpp File Reference
#include "WinCFGuard.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Instructions.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCStreamer.h"
#include <vector>
Include dependency graph for WinCFGuard.cpp:

Go to the source code of this file.

Functions

static bool isPossibleIndirectCallTarget (const Function *F)
 Returns true if this function's address is escaped in a way that might make it an indirect call target. More...
 

Function Documentation

◆ isPossibleIndirectCallTarget()

static bool isPossibleIndirectCallTarget ( const Function F)
static

Returns true if this function's address is escaped in a way that might make it an indirect call target.

Function::hasAddressTaken gives different results when a function is called directly with a function prototype mismatch, which requires a cast.

Definition at line 49 of file WinCFGuard.cpp.

References C, F(), llvm::Value::stripPointerCasts(), Users, and llvm::Value::uses().

Referenced by llvm::WinCFGuard::endModule().