LLVM 22.0.0git
EHStreamer.cpp File Reference
#include "EHStreamer.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/IR/Function.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <vector>

Go to the source code of this file.

Variables

 MarkedNoUnwind = false
 Return ‘true’ if this is a call to a function marked ‘nounwind’.
 break
 SawFunc = true

Variable Documentation

◆ break

break

Definition at line 176 of file EHStreamer.cpp.

◆ MarkedNoUnwind

return MarkedNoUnwind = false

Return ‘true’ if this is a call to a function marked ‘nounwind’.

Return ‘false’ otherwise. bool EHStreamer::callToNoUnwindFunction(const MachineInstr *MI) { assert(MI->isCall() && "This should be a call instruction!");

bool MarkedNoUnwind = false; bool SawFunc = false;

for (const MachineOperand &MO : MI->operands()) { if (!MO.isGlobal()) continue;

const Function *F = dyn_cast<Function>(MO.getGlobal()); if (!F) continue;

if (SawFunc) { Be conservative. If we have more than one function operand for this call, then we can't make the assumption that it's the callee and not a parameter to the call.

FIXME: Determine if there's a way to say that ‘F’ is the callee or

Definition at line 175 of file EHStreamer.cpp.

◆ SawFunc

SawFunc = true

Definition at line 180 of file EHStreamer.cpp.