clang: lib/CodeGen/CodeGenModule.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_CLANG_LIB_CODEGEN_CODEGENMODULE_H

14#define LLVM_CLANG_LIB_CODEGEN_CODEGENMODULE_H

15

34#include "llvm/ADT/DenseMap.h"

35#include "llvm/ADT/MapVector.h"

36#include "llvm/ADT/SetVector.h"

37#include "llvm/ADT/SmallPtrSet.h"

38#include "llvm/ADT/StringMap.h"

39#include "llvm/IR/Module.h"

40#include "llvm/IR/ValueHandle.h"

41#include "llvm/Transforms/Utils/SanitizerStats.h"

42#include

43

44namespace llvm {

46class Constant;

47class ConstantInt;

49class GlobalValue;

50class DataLayout;

51class FunctionType;

52class LLVMContext;

53class IndexedInstrProfReader;

54

55namespace vfs {

56class FileSystem;

57}

58}

59

81class AnnotateAttr;

85class InitSegAttr;

86

88

100

105

106

107

108

109

110

111

112

113

114

115

116

118public:

119

121 private:

122 static constexpr uint32_t None = (1u << 31);

123 static constexpr uint32_t Mask = None - 1;

124

125 uint32_t Val;

126

127 public:

129

131 assert(!(InitVal & ~Mask));

132 Val = InitVal;

133 }

134

135 bool hasValue() const { return !(Val & None); }

136

137 operator uint32_t() const { return Val; }

138 };

139

142

143

145

146

148};

149

165

168

169

171

172

174

175

177

178

180

181

182

184

185

187

188

190

191

192

194

195

197

198

200

201

203

204

206

207

209

210

212

213

215

216

218

219

220

222

223

225

226

228

229

231

232

234

235

237

238

239

241

242

244

245

247

248

250

251

252

254

255

257

258

260};

261

262

264 uint32_t VisitedInMainFile = 0;

265 uint32_t MissingInMainFile = 0;

266 uint32_t Visited = 0;

267 uint32_t Missing = 0;

268 uint32_t Mismatched = 0;

269

270public:

272

273

275 if (MainFile)

276 ++VisitedInMainFile;

277 ++Visited;

278 }

279

281 if (MainFile)

282 ++MissingInMainFile;

283 ++Missing;

284 }

285

287

289

291};

292

293

295

296

297public:

300

301

302

303

305

310

311 void Profile(llvm::FoldingSetNodeID &id) const {

312 id.AddInteger(Alignment.getQuantity());

314 }

315 virtual void profileImpl(llvm::FoldingSetNodeID &id) const = 0;

316

317 virtual bool needsCopy() const { return true; }

319

322};

323

324

325

327 CodeGenModule(const CodeGenModule &) = delete;

328 void operator=(const CodeGenModule &) = delete;

329

330public:

344

346

347private:

351 const HeaderSearchOptions &HeaderSearchOpts;

352 const PreprocessorOptions &PreprocessorOpts;

354 unsigned NumAutoVarInit = 0;

355 llvm::Module &TheModule;

358 std::unique_ptr ABI;

359 llvm::LLVMContext &VMContext;

360 std::string ModuleNameHash;

361 bool CXX20ModuleInits = false;

362 std::unique_ptr TBAA;

363

364 mutable std::unique_ptr TheTargetCodeGenInfo;

365

366

367

368

369 std::unique_ptr Types;

370

371

373

374 std::unique_ptr ObjCRuntime;

375 std::unique_ptr OpenCLRuntime;

376 std::unique_ptr OpenMPRuntime;

377 std::unique_ptr CUDARuntime;

378 std::unique_ptr HLSLRuntime;

379 std::unique_ptr DebugInfo;

380 std::unique_ptr ObjCData;

381 llvm::MDNode *NoObjCARCExceptionsMetadata = nullptr;

382 std::unique_ptrllvm::IndexedInstrProfReader PGOReader;

384 std::unique_ptrllvm::SanitizerStatReport SanStats;

386

387

388

389

391

392

393

394

395

396 llvm::DenseMap<StringRef, GlobalDecl> DeferredDecls;

397

398 llvm::StringSetllvm::BumpPtrAllocator DeferredResolversToEmit;

399

400

401

402 std::vector DeferredDeclsToEmit;

403 void addDeferredDeclToEmit(GlobalDecl GD) {

404 DeferredDeclsToEmit.emplace_back(GD);

405 addEmittedDeferredDecl(GD);

406 }

407

408

409 llvm::DenseMap<llvm::StringRef, GlobalDecl> EmittedDeferredDecls;

410

411 void addEmittedDeferredDecl(GlobalDecl GD) {

412

413 if (!Context.getLangOpts().IncrementalExtensions)

414 return;

415

416

417 auto L = llvm::GlobalValue::ExternalLinkage;

418 if (llvm::isa(GD.getDecl()))

420 else if (auto *VD = llvm::dyn_cast(GD.getDecl()))

422

423 if (llvm::GlobalValue::isInternalLinkage(L) ||

424 llvm::GlobalValue::isLinkOnceLinkage(L) ||

425 llvm::GlobalValue::isWeakLinkage(L)) {

427 }

428 }

429

430

431

432 std::vector Aliases;

433

434

435

436

437 std::vector MultiVersionFuncs;

438

439 llvm::MapVector<StringRef, llvm::TrackingVHllvm::Constant> Replacements;

440

441

442

443

445 GlobalValReplacements;

446

447

448

449 llvm::DenseMap<const VarDecl*, llvm::GlobalVariable*> InitializerConstants;

450

451

452

453

454 llvm::DenseSet DiagnosedConflictingDefinitions;

455

456

457 std::vector<const CXXRecordDecl*> DeferredVTables;

458

459

460 std::vector<const CXXRecordDecl *> OpportunisticVTables;

461

462

463

464

465 std::vectorllvm::WeakTrackingVH LLVMUsed;

466 std::vectorllvm::WeakTrackingVH LLVMCompilerUsed;

467

468

469

471

472

473

475

476

477 llvm::MapVector<GlobalDecl, StringRef> MangledDeclNames;

478 llvm::StringMap<GlobalDecl, llvm::BumpPtrAllocator> Manglings;

479

480

481 std::vectorllvm::Constant\* Annotations;

482

483

484

485 llvm::MapVector<StringRef, const ValueDecl *> DeferredAnnotations;

486

487

488 llvm::StringMapllvm::Constant\* AnnotationStrings;

489

490

491 llvm::DenseMap<unsigned, llvm::Constant *> AnnotationArgs;

492

493 llvm::StringMap<llvm::GlobalVariable *> CFConstantStringMap;

494

495 llvm::DenseMap<llvm::Constant *, llvm::GlobalVariable *> ConstantStringMap;

496 llvm::DenseMap<const UnnamedGlobalConstantDecl *, llvm::GlobalVariable *>

497 UnnamedGlobalConstantDeclMap;

498 llvm::DenseMap<const Decl*, llvm::Constant *> StaticLocalDeclMap;

499 llvm::DenseMap<const Decl*, llvm::GlobalVariable*> StaticLocalDeclGuardMap;

500 llvm::DenseMap<const Expr*, llvm::Constant *> MaterializedGlobalTemporaryMap;

501

502 llvm::DenseMap<QualType, llvm::Constant *> AtomicSetterHelperFnMap;

503 llvm::DenseMap<QualType, llvm::Constant *> AtomicGetterHelperFnMap;

504

505

506 llvm::DenseMap<QualType, llvm::Constant *> TypeDescriptorMap;

507

508

509

510 typedef llvm::MapVector<IdentifierInfo *,

511 llvm::GlobalValue *> StaticExternCMap;

512 StaticExternCMap StaticExternCValues;

513

514

515 std::vector<const VarDecl *> CXXThreadLocals;

516

517

518

519 std::vector<llvm::Function *> CXXThreadLocalInits;

520 std::vector<const VarDecl *> CXXThreadLocalInitVars;

521

522

523 std::vector<llvm::Function *> CXXGlobalInits;

524

525

526

527

528

529

530 llvm::DenseMap<const Decl*, unsigned> DelayedCXXInitPosition;

531

532 typedef std::pair<OrderGlobalInitsOrStermFinalizers, llvm::Function *>

533 GlobalInitData;

534

535

536

537

538

539

541 MustTailCallUndefinedGlobals;

542

543 struct GlobalInitPriorityCmp {

544 bool operator()(const GlobalInitData &LHS,

545 const GlobalInitData &RHS) const {

546 return LHS.first.priority < RHS.first.priority;

547 }

548 };

549

550

551

552 SmallVector<GlobalInitData, 8> PrioritizedCXXGlobalInits;

553

554

555

556

557 typedef std::tuple<llvm::FunctionType *, llvm::WeakTrackingVH,

558 llvm::Constant *>

559 CXXGlobalDtorsOrStermFinalizer_t;

560 SmallVector<CXXGlobalDtorsOrStermFinalizer_t, 8>

561 CXXGlobalDtorsOrStermFinalizers;

562

563 typedef std::pair<OrderGlobalInitsOrStermFinalizers, llvm::Function *>

564 StermFinalizerData;

565

566 struct StermFinalizerPriorityCmp {

567 bool operator()(const StermFinalizerData &LHS,

568 const StermFinalizerData &RHS) const {

569 return LHS.first.priority < RHS.first.priority;

570 }

571 };

572

573

574

575 SmallVector<StermFinalizerData, 8> PrioritizedCXXStermFinalizers;

576

577

578 llvm::SetVector<clang::Module *> ImportedModules;

579

580

581

582 llvm::SmallPtrSet<clang::Module *, 16> EmittedModuleInitializers;

583

584

585 SmallVector<llvm::MDNode *, 16> LinkerOptionsMetadata;

586

587

588 SmallVector<llvm::MDNode *, 16> ELFDependentLibraries;

589

590

591

592

593

594

595 llvm::WeakTrackingVH CFConstantStringClassRef;

596

597

598

599 QualType ObjCFastEnumerationStateType;

600

601

602

603

604 void createObjCRuntime();

605

606 void createOpenCLRuntime();

607 void createOpenMPRuntime();

608 void createCUDARuntime();

609 void createHLSLRuntime();

610

611 bool isTriviallyRecursive(const FunctionDecl *F);

612 bool shouldEmitFunction(GlobalDecl GD);

613

614

615 bool shouldEmitCUDAGlobalVar(const VarDecl *VD) const;

616 bool shouldOpportunisticallyEmitVTables();

617

618 llvm::DenseMap<const CompoundLiteralExpr *, llvm::GlobalVariable *>

619 EmittedCompoundLiterals;

620

621

622

623 llvm::DenseMap<const BlockExpr *, llvm::Constant *> EmittedGlobalBlocks;

624

625

626

627

628 llvm::Constant *NSConcreteGlobalBlock = nullptr;

629 llvm::Constant *NSConcreteStackBlock = nullptr;

630

631 llvm::FunctionCallee BlockObjectAssign = nullptr;

632 llvm::FunctionCallee BlockObjectDispose = nullptr;

633

634 llvm::Type *BlockDescriptorType = nullptr;

635 llvm::Type *GenericBlockLiteralType = nullptr;

636

637 struct {

640

642

643

644

645

646 llvm::Function *LifetimeStartFn = nullptr;

647

648

649 llvm::Function *LifetimeEndFn = nullptr;

650

651

652 llvm::Function *FakeUseFn = nullptr;

653

654 std::unique_ptr SanitizerMD;

655

656 llvm::MapVector<const Decl *, bool> DeferredEmptyCoverageMappingDecls;

657

658 std::unique_ptr CoverageMapping;

659

660

661

662

663 typedef llvm::DenseMap<QualType, llvm::Metadata *> MetadataTypeMap;

664 MetadataTypeMap MetadataIdMap;

665 MetadataTypeMap VirtualMetadataIdMap;

666 MetadataTypeMap GeneralizedMetadataIdMap;

667

668

669

670 std::pair<std::unique_ptr, const TopLevelStmtDecl *>

671 GlobalTopLevelStmtBlockInFlight;

672

673 llvm::DenseMap<GlobalDecl, uint16_t> PtrAuthDiscriminatorHashes;

674

675 llvm::DenseMap<const CXXRecordDecl *, std::optional>

676 VTablePtrAuthInfos;

677 std::optional

678 computeVTPointerAuthentication(const CXXRecordDecl *ThisClass);

679

681

682

683

684

685 std::vectorstd::string MSHotPatchFunctions;

686

687public:

694

696

698

699

701

702

704

705

707

708

710

711

713 if (!ObjCRuntime) createObjCRuntime();

714 return *ObjCRuntime;

715 }

716

717

719

721

722

724 assert(OpenCLRuntime != nullptr);

725 return *OpenCLRuntime;

726 }

727

728

730 assert(OpenMPRuntime != nullptr);

731 return *OpenMPRuntime;

732 }

733

734

736 assert(CUDARuntime != nullptr);

737 return *CUDARuntime;

738 }

739

740

742 assert(HLSLRuntime != nullptr);

743 return *HLSLRuntime;

744 }

745

747 assert(ObjCData != nullptr);

748 return *ObjCData;

749 }

750

751

752

754

756

758 llvm::IndexedInstrProfReader *getPGOReader() const { return PGOReader.get(); }

759

761 return CoverageMapping.get();

762 }

763

765 return StaticLocalDeclMap[D];

766 }

768 llvm::Constant *C) {

769 StaticLocalDeclMap[D] = C;

770 }

771

772 llvm::Constant *

774 llvm::GlobalValue::LinkageTypes Linkage);

775

777 return StaticLocalDeclGuardMap[D];

778 }

780 llvm::GlobalVariable *C) {

781 StaticLocalDeclGuardMap[D] = C;

782 }

783

786

789

791 return AtomicSetterHelperFnMap[Ty];

792 }

794 llvm::Constant *Fn) {

795 AtomicSetterHelperFnMap[Ty] = Fn;

796 }

797

799 return AtomicGetterHelperFnMap[Ty];

800 }

802 llvm::Constant *Fn) {

803 AtomicGetterHelperFnMap[Ty] = Fn;

804 }

805

807 return TypeDescriptorMap[Ty];

808 }

810 TypeDescriptorMap[Ty] = C;

811 }

812

814

816 if (!NoObjCARCExceptionsMetadata)

817 NoObjCARCExceptionsMetadata = llvm::MDNode::get(getLLVMContext(), {});

818 return NoObjCARCExceptionsMetadata;

819 }

820

827 const { return HeaderSearchOpts; }

829 const { return PreprocessorOpts; }

831 llvm::Module &getModule() const { return TheModule; }

834 return TheModule.getDataLayout();

835 }

837 const llvm::Triple &getTriple() const { return Target.getTriple(); }

840

844

846

848

850

852

854 return VTables.getItaniumVTableContext();

855 }

856

858 return VTables.getItaniumVTableContext();

859 }

860

862 return VTables.getMicrosoftVTableContext();

863 }

864

867

868

869

871

872

873

875

876

877

879

881

882

883

885

886

888

889

890

893

894

895

898

899

900

903

904

905

907 if (Base.getTBAAInfo().isMayAlias())

910 }

911

914

915

918

919

922

923

925

926

928

929 void setDSOLocal(llvm::GlobalValue *GV) const;

930

941

942

945

947

948

949

951

952

954

956 switch (V) {

957 case DefaultVisibility: return llvm::GlobalValue::DefaultVisibility;

958 case HiddenVisibility: return llvm::GlobalValue::HiddenVisibility;

960 }

961 llvm_unreachable("unknown visibility!");

962 }

963

967

968

969

970

971

972 llvm::GlobalVariable *

974 llvm::GlobalValue::LinkageTypes Linkage,

975 llvm::Align Alignment);

976

978 llvm::FunctionType *ty, const Twine &name, const CGFunctionInfo &FI,

980 llvm::GlobalVariable::LinkageTypes Linkage =

981 llvm::GlobalVariable::InternalLinkage);

982

983

984

985

986

987

988

989

990

992

993

994

995

996

997

999

1000

1001

1002

1003

1004

1005

1007 llvm::Type *Ty = nullptr,

1010

1011

1012

1014 bool ForVTable = false,

1015 bool DontDefer = false,

1018

1019

1021

1022

1023

1024

1026 llvm::Type *Ty = nullptr);

1027

1028

1029

1030

1032

1033

1034

1035

1038

1040 llvm::Type *Ty = nullptr);

1041

1044

1046

1048

1050

1052

1056 llvm::Constant *StorageAddress,

1059

1060 llvm::Constant *

1062 llvm::Constant *StorageAddress,

1063 llvm::ConstantInt *OtherDiscriminator);

1064

1065 llvm::ConstantInt *

1068

1070 std::optional

1073 llvm::Value *StorageAddress);

1074

1075 std::optional

1077

1079

1080

1085

1086

1088

1089

1091

1092

1095

1096

1099

1100

1101 llvm::Constant *GetAddrOfThunk(StringRef Name, llvm::Type *FnTy,

1103

1104

1106

1107

1109

1110

1111

1113

1114

1120

1121

1125

1126

1127

1128

1132

1137

1138

1139

1140 llvm::Constant *

1144

1146

1147

1149

1150

1152

1153

1155

1156

1158

1159

1160

1162 return EmittedGlobalBlocks.lookup(BE);

1163 }

1164

1165

1166

1168

1169

1171

1172

1174

1175

1178 StringRef Name = ".str");

1179

1180

1183

1184

1185

1186

1187

1188

1190 StringRef GlobalName = ".str");

1191

1192

1193

1195

1196

1197

1198 llvm::GlobalVariable *

1200

1201

1202

1204 llvm::GlobalVariable *GV);

1205

1206

1207

1209 const Expr *Inner);

1210

1211

1212

1214

1215

1216

1217

1219

1220

1221 llvm::Constant *

1223 llvm::FunctionType *FnType = nullptr,

1224 bool DontDefer = false,

1227 DontDefer,

1228 IsForDefinition)

1230 }

1231

1234 llvm::FunctionType *FnType = nullptr, bool DontDefer = false,

1236

1237

1238

1240 unsigned BuiltinID);

1241

1243

1245

1246

1248

1249

1250

1252

1253

1254

1256

1257

1258

1260

1261

1263

1264

1266

1267

1268

1269

1270 template

1272

1273

1275

1276

1278

1279

1281

1282

1283 void AddCXXDtorEntry(llvm::FunctionCallee DtorFn, llvm::Constant *Object) {

1284 CXXGlobalDtorsOrStermFinalizers.emplace_back(DtorFn.getFunctionType(),

1285 DtorFn.getCallee(), Object);

1286 }

1287

1288

1290 CXXGlobalDtorsOrStermFinalizers.emplace_back(DtorFn.getFunctionType(),

1291 DtorFn.getCallee(), nullptr);

1292 }

1293

1294

1296 int Priority) {

1298 }

1299

1301 int Priority) {

1303 PrioritizedCXXStermFinalizers.size());

1304 PrioritizedCXXStermFinalizers.push_back(

1305 std::make_pair(Key, StermFinalizer));

1306 }

1307

1308

1309

1310

1311

1312

1313

1314 llvm::FunctionCallee

1316 llvm::AttributeList ExtraAttrs = llvm::AttributeList(),

1317 bool Local = false, bool AssumeConvergent = false);

1318

1319

1320

1321

1322 llvm::FunctionCallee

1324 StringRef Name,

1325 llvm::AttributeList ExtraAttrs = llvm::AttributeList(),

1326 bool Local = false, bool AssumeConvergent = false);

1327

1328

1330 StringRef Name);

1331

1332

1333

1334

1339

1340

1341

1345

1346

1348

1350

1351

1352

1355

1356

1357

1358

1360

1361

1362

1364

1365

1367

1368

1370

1371

1373

1374

1375

1376

1377

1379 llvm::function_ref<void()> Fn);

1380

1381

1382

1383

1386

1387

1389 llvm::Function *F, bool IsThunk);

1390

1391

1392

1394

1395

1396

1398

1399

1401

1402

1404

1405

1406

1408

1409

1411

1412

1414

1415

1416

1417

1418

1419

1420

1421

1422

1423

1424

1427 llvm::AttributeList &Attrs, unsigned &CallingConv,

1428 bool AttrOnCallSite, bool IsThunk);

1429

1430

1431

1432

1434 llvm::AttributeList &Attrs);

1435

1436

1437

1439

1443

1445

1447

1449

1451

1452

1454

1455

1457

1458

1460

1461

1463

1467

1468

1469

1471

1472

1474

1475

1476 llvm::GlobalValue::LinkageTypes

1478

1479

1480 llvm::GlobalValue::LinkageTypes

1482

1483

1485

1486

1488

1489

1491

1492

1494

1495

1497

1498

1499

1500

1501

1502

1503

1504

1506 const AnnotateAttr *AA,

1508

1509

1510

1512

1515

1518 StringRef Category = StringRef()) const;

1519

1520

1521

1522

1524 StringRef Category = StringRef()) const;

1525

1526

1527

1530

1531

1532

1536

1538 return SanitizerMD.get();

1539 }

1540

1542 DeferredVTables.push_back(RD);

1543 }

1544

1545

1546

1548

1551

1553

1554

1555

1556

1557

1559

1561

1563

1564

1565

1567

1568

1571

1572

1575

1576

1579

1582

1583

1584

1586

1587

1588

1590

1591

1593

1594

1595

1596

1598

1599

1600

1601

1603

1604

1605

1606

1607

1608

1609

1610 llvm::GlobalObject::VCallVisibility

1612 llvm::DenseSet<const CXXRecordDecl *> &Visited);

1613

1614

1616 llvm::GlobalVariable *VTable,

1618

1620

1621

1623

1624

1626

1627

1629

1630

1631

1632

1634

1635

1636

1638

1639

1640

1641

1643

1644

1646 llvm::Function *F);

1647

1648

1649

1651

1652

1654

1655

1657

1658

1660

1661

1662

1665

1666

1668

1669

1672

1673

1674

1675

1676

1677

1680

1681

1683

1684 llvm::SanitizerStatReport &getSanStats();

1685

1686 llvm::Value *

1688

1689

1690

1691

1692

1693

1694

1695

1696

1697

1698

1702

1703

1704

1705

1707

1711 bool forPointeeType = false);

1716

1717

1718

1719

1720

1721

1723 const Decl *D) const;

1724

1725

1726

1727

1729

1730

1731

1732

1734 const CUDALaunchBoundsAttr *A,

1735 int32_t *MaxThreadsVal = nullptr,

1736 int32_t *MinBlocksVal = nullptr,

1737 int32_t *MaxClusterRankVal = nullptr);

1738

1739

1740

1741

1742

1743

1745 llvm::Function *F, const AMDGPUFlatWorkGroupSizeAttr *A,

1746 const ReqdWorkGroupSizeAttr *ReqdWGS = nullptr,

1747 int32_t *MinThreadsVal = nullptr, int32_t *MaxThreadsVal = nullptr);

1748

1749

1751 const AMDGPUWavesPerEUAttr *A);

1752

1753 llvm::Constant *

1757

1758

1759 void AddGlobalCtor(llvm::Function *Ctor, int Priority = 65535,

1760 unsigned LexOrder = ~0U,

1761 llvm::Constant *AssociatedData = nullptr);

1762 void AddGlobalDtor(llvm::Function *Dtor, int Priority = 65535,

1763 bool IsDtorAttrFunc = false);

1764

1765

1766

1768

1769

1770 return getTriple().isSPIRVLogical();

1771 }

1772

1774 std::pair<const FunctionDecl *, SourceLocation> Global) {

1775 MustTailCallUndefinedGlobals.insert(Global);

1776 }

1777

1779

1780

1781

1782

1783

1784

1785

1786

1787

1788

1789

1790

1791

1792

1793

1794

1795

1796

1797

1798

1799

1800

1801

1802

1803

1804

1805

1806

1807

1808

1809

1810

1811

1812

1813

1814

1815

1816

1817

1818

1819

1820

1821

1822

1823

1824

1825

1827 }

1828

1829

1833 ? 32

1835 return PAlign;

1836 }

1837

1838

1842

1843private:

1844 bool shouldDropDLLAttribute(const Decl *D, const llvm::GlobalValue *GV) const;

1845

1846 llvm::Constant *GetOrCreateLLVMFunction(

1847 StringRef MangledName, llvm::Type *Ty, GlobalDecl D, bool ForVTable,

1848 bool DontDefer = false, bool IsThunk = false,

1849 llvm::AttributeList ExtraAttrs = llvm::AttributeList(),

1851

1852

1853 void AddDeferredMultiVersionResolverToEmit(GlobalDecl GD);

1854

1855

1856

1857

1858

1859

1860 llvm::Constant *GetOrCreateMultiVersionResolver(GlobalDecl GD);

1861

1862

1863

1864

1865

1866

1867

1868 void setMultiVersionResolverAttributes(llvm::Function *Resolver,

1870

1871

1872

1873

1874

1875

1877 StringRef &CurName);

1878

1879 bool GetCPUAndFeaturesAttributes(GlobalDecl GD,

1880 llvm::AttrBuilder &AttrBuilder,

1881 bool SetTargetFeatures = true);

1882 void setNonAliasAttributes(GlobalDecl GD, llvm::GlobalObject *GO);

1883

1884

1885 void SetFunctionAttributes(GlobalDecl GD, llvm::Function *F,

1886 bool IsIncompleteFunction, bool IsThunk);

1887

1888 void EmitGlobalDefinition(GlobalDecl D, llvm::GlobalValue *GV = nullptr);

1889

1890 void EmitGlobalFunctionDefinition(GlobalDecl GD, llvm::GlobalValue *GV);

1891 void EmitMultiVersionFunctionDefinition(GlobalDecl GD, llvm::GlobalValue *GV);

1892

1893 void EmitGlobalVarDefinition(const VarDecl *D, bool IsTentative = false);

1894 void EmitAliasDefinition(GlobalDecl GD);

1895 void emitIFuncDefinition(GlobalDecl GD);

1896 void emitCPUDispatchDefinition(GlobalDecl GD);

1899

1900

1901

1902 void EmitDeclContext(const DeclContext *DC);

1905

1906

1907 void EmitCXXThreadLocalInitFunc();

1908

1909

1910 void EmitCXXModuleInitFunc(clang::Module *Primary);

1911

1912

1913 void EmitCXXGlobalInitFunc();

1914

1915

1916 void EmitCXXGlobalCleanUpFunc();

1917

1918

1919

1920 void EmitCXXGlobalVarDeclInitFunc(const VarDecl *D,

1921 llvm::GlobalVariable *Addr,

1922 bool PerformInit);

1923

1924 void EmitPointerToInitFunc(const VarDecl *VD, llvm::GlobalVariable *Addr,

1925 llvm::Function *InitFunc, InitSegAttr *ISA);

1926

1927

1928

1929

1930 void EmitCtorList(CtorList &Fns, const char *GlobalName);

1931

1932

1933 void EmitDeferred();

1934

1935

1936

1937

1938

1939 void EmitVTablesOpportunistically();

1940

1941

1942 void applyReplacements();

1943

1944

1945 void applyGlobalValReplacements();

1946

1947 void checkAliases();

1948

1949 std::map<int, llvm::TinyPtrVector<llvm::Function *>> DtorsUsingAtExit;

1950

1951

1952

1953 void registerGlobalDtorsWithAtExit();

1954

1955

1956

1957

1958 void unregisterGlobalDtorsWithUnAtExit();

1959

1960

1961 void emitMultiVersionFunctions();

1962

1963

1964 void EmitDeferredVTables();

1965

1966

1967

1968 void emitAtAvailableLinkGuard();

1969

1970

1971 void emitLLVMUsed();

1972

1973

1974 void EmitModuleInitializers(clang::Module *Primary);

1975

1976

1977 void EmitModuleLinkOptions();

1978

1979

1980

1981

1982

1983

1984

1985

1986 bool CheckAndReplaceExternCIFuncs(llvm::GlobalValue *Elem,

1987 llvm::GlobalValue *CppFunc);

1988

1989

1990

1991 void EmitStaticExternCAliases();

1992

1993 void EmitDeclMetadata();

1994

1995

1996 void EmitVersionIdentMetadata();

1997

1998

1999 void EmitCommandLineMetadata();

2000

2001

2002

2003 void EmitBackendOptionsMetadata(const CodeGenOptions &CodeGenOpts);

2004

2005

2006 void EmitOpenCLMetadata();

2007

2008

2009

2010 void EmitCoverageFile();

2011

2012

2013

2014 void EmitSYCLKernelCaller(const FunctionDecl *KernelEntryPointFn,

2016

2017

2018

2019 bool MustBeEmitted(const ValueDecl *D);

2020

2021

2022

2023

2024

2025 bool MayBeEmittedEagerly(const ValueDecl *D);

2026

2027

2028

2029 void SimplifyPersonality();

2030

2031

2032

2034 bool AttrOnCallSite,

2035 llvm::AttrBuilder &FuncAttrs);

2036

2037

2038

2039

2040 void getDefaultFunctionAttributes(StringRef Name, bool HasOptnone,

2041 bool AttrOnCallSite,

2042 llvm::AttrBuilder &FuncAttrs);

2043

2044 llvm::Metadata *CreateMetadataIdentifierImpl(QualType T, MetadataTypeMap &Map,

2045 StringRef Suffix);

2046};

2047

2048}

2049}

2050

2051#endif

Enums/classes describing ABI related information about constructors, destructors and thunks.

static void getTrivialDefaultFunctionAttributes(StringRef Name, bool HasOptnone, const CodeGenOptions &CodeGenOpts, const LangOptions &LangOpts, bool AttrOnCallSite, llvm::AttrBuilder &FuncAttrs)

Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....

This file defines OpenMP nodes for declarative directives.

Defines the clang::LangOptions interface.

llvm::MachO::Record Record

Defines a utilitiy for warning once when close to out of stack space.

This file contains the declaration of TrapReasonBuilder and related classes.

__DEVICE__ void * memset(void *__a, int __b, size_t __c)

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...

CharUnits getTypeSizeInChars(QualType T) const

Return the size of the specified (complete) type T, in characters.

Attr - This represents one attribute.

Represents a block literal declaration, which is like an unnamed FunctionDecl.

BlockExpr - Adaptor class for mixing a BlockDecl with expressions.

Represents a C++ destructor within a class.

Represents a C++ struct/union/class.

const CXXBaseSpecifier *const * path_const_iterator

CharUnits - This is an opaque type for sizes expressed in character units.

CodeGenOptions - Track various options which control how the code is optimized and passed to the back...

ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions.

Like RawAddress, an abstract representation of an aligned address, but the pointer contained in this ...

virtual ~BlockByrefHelpers()

void Profile(llvm::FoldingSetNodeID &id) const

Definition CodeGenModule.h:311

virtual void emitCopy(CodeGenFunction &CGF, Address dest, Address src)=0

BlockByrefHelpers(CharUnits alignment)

Definition CodeGenModule.h:306

virtual bool needsCopy() const

Definition CodeGenModule.h:317

llvm::Constant * CopyHelper

Definition CodeGenModule.h:298

CharUnits Alignment

The alignment of the field.

Definition CodeGenModule.h:304

virtual void emitDispose(CodeGenFunction &CGF, Address field)=0

BlockByrefHelpers(const BlockByrefHelpers &)=default

virtual bool needsDispose() const

Definition CodeGenModule.h:320

llvm::Constant * DisposeHelper

Definition CodeGenModule.h:299

virtual void profileImpl(llvm::FoldingSetNodeID &id) const =0

Implements C++ ABI-specific code generation functions.

Abstract information about a function or function prototype.

This class gathers all debug information during compilation and is responsible for emitting to llvm g...

CGFunctionInfo - Class to encapsulate the information about a function definition.

Implements runtime-specific code generation functions.

CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...

This class organizes the cross-function state that is used while generating LLVM code.

Definition CodeGenModule.h:326

StringRef getBlockMangledName(GlobalDecl GD, const BlockDecl *BD)

llvm::FunctionCallee getBlockObjectAssign()

const PreprocessorOptions & getPreprocessorOpts() const

Definition CodeGenModule.h:828

ConstantAddress GetAddrOfMSGuidDecl(const MSGuidDecl *GD)

Get the address of a GUID.

void AddCXXPrioritizedStermFinalizerEntry(llvm::Function *StermFinalizer, int Priority)

Definition CodeGenModule.h:1300

void setGVProperties(llvm::GlobalValue *GV, GlobalDecl GD) const

Set visibility, dllimport/dllexport and dso_local.

void AddCXXDtorEntry(llvm::FunctionCallee DtorFn, llvm::Constant *Object)

Add a destructor and object to add to the C++ global destructor function.

Definition CodeGenModule.h:1283

llvm::FoldingSet< BlockByrefHelpers > ByrefHelpersCache

Definition CodeGenModule.h:1145

void AddVTableTypeMetadata(llvm::GlobalVariable *VTable, CharUnits Offset, const CXXRecordDecl *RD)

Create and attach type metadata for the given vtable.

void UpdateCompletedType(const TagDecl *TD)

void handleCUDALaunchBoundsAttr(llvm::Function *F, const CUDALaunchBoundsAttr *A, int32_t *MaxThreadsVal=nullptr, int32_t *MinBlocksVal=nullptr, int32_t *MaxClusterRankVal=nullptr)

Emit the IR encoding to attach the CUDA launch bounds attribute to F.

llvm::MDNode * getTBAAAccessTagInfo(TBAAAccessInfo Info)

getTBAAAccessTagInfo - Get TBAA tag for a given memory access.

llvm::MDNode * getNoObjCARCExceptionsMetadata()

Definition CodeGenModule.h:815

void AddCXXStermFinalizerToGlobalDtor(llvm::Function *StermFinalizer, int Priority)

Add an sterm finalizer to its own llvm.global_dtors entry.

Definition CodeGenModule.h:1295

llvm::GlobalVariable::ThreadLocalMode GetDefaultLLVMTLSModel() const

Get LLVM TLS mode from CodeGenOptions.

void EmitExplicitCastExprType(const ExplicitCastExpr *E, CodeGenFunction *CGF=nullptr)

Emit type info if type of an expression is a variably modified type.

void SetInternalFunctionAttributes(GlobalDecl GD, llvm::Function *F, const CGFunctionInfo &FI)

Set the attributes on the LLVM function for the given decl and function info.

void setDSOLocal(llvm::GlobalValue *GV) const

llvm::GlobalObject::VCallVisibility GetVCallVisibilityLevel(const CXXRecordDecl *RD, llvm::DenseSet< const CXXRecordDecl * > &Visited)

Returns the vcall visibility of the given type.

llvm::MDNode * getTBAAStructInfo(QualType QTy)

CGHLSLRuntime & getHLSLRuntime()

Return a reference to the configured HLSL runtime.

Definition CodeGenModule.h:741

llvm::Constant * EmitAnnotationArgs(const AnnotateAttr *Attr)

Emit additional args of the annotation.

llvm::Module & getModule() const

Definition CodeGenModule.h:831

llvm::FunctionCallee CreateRuntimeFunction(llvm::FunctionType *Ty, StringRef Name, llvm::AttributeList ExtraAttrs=llvm::AttributeList(), bool Local=false, bool AssumeConvergent=false)

Create or return a runtime function declaration with the specified type and name.

llvm::ConstantInt * CreateKCFITypeId(QualType T, StringRef Salt)

Generate a KCFI type identifier for T.

CGDebugInfo * getModuleDebugInfo()

Definition CodeGenModule.h:813

ConstantAddress GetAddrOfConstantCompoundLiteral(const CompoundLiteralExpr *E)

Returns a pointer to a constant global variable for the given file-scope compound literal expression.

void setLLVMFunctionFEnvAttributes(const FunctionDecl *D, llvm::Function *F)

Set the LLVM function attributes that represent floating point environment.

bool NeedAllVtablesTypeId() const

Returns whether this module needs the "all-vtables" type identifier.

void addCompilerUsedGlobal(llvm::GlobalValue *GV)

Add a global to a list to be added to the llvm.compiler.used metadata.

CodeGenVTables & getVTables()

Definition CodeGenModule.h:851

CtorList & getGlobalDtors()

Definition CodeGenModule.h:866

llvm::ConstantInt * CreateCrossDsoCfiTypeId(llvm::Metadata *MD)

Generate a cross-DSO type identifier for MD.

void setStaticLocalDeclAddress(const VarDecl *D, llvm::Constant *C)

Definition CodeGenModule.h:767

llvm::Constant * EmitNullConstantForBase(const CXXRecordDecl *Record)

Return a null constant appropriate for zero-initializing a base class with the given type.

llvm::Function * getLLVMLifetimeStartFn()

Lazily declare the @llvm.lifetime.start intrinsic.

CharUnits GetTargetTypeStoreSize(llvm::Type *Ty) const

Return the store size, in character units, of the given LLVM type.

void handleAMDGPUWavesPerEUAttr(llvm::Function *F, const AMDGPUWavesPerEUAttr *A)

Emit the IR encoding to attach the AMD GPU waves-per-eu attribute to F.

void createFunctionTypeMetadataForIcall(const FunctionDecl *FD, llvm::Function *F)

Create and attach type metadata to the given function.

void AddCXXStermFinalizerEntry(llvm::FunctionCallee DtorFn)

Add an sterm finalizer to the C++ global cleanup function.

Definition CodeGenModule.h:1289

void setTypeDescriptorInMap(QualType Ty, llvm::Constant *C)

Definition CodeGenModule.h:809

bool getExpressionLocationsEnabled() const

Return true if we should emit location information for expressions.

CharUnits getMinimumClassObjectSize(const CXXRecordDecl *CD)

Returns the minimum object size for an object of the given class type (or a class derived from it).

void addGlobalValReplacement(llvm::GlobalValue *GV, llvm::Constant *C)

llvm::Constant * getRawFunctionPointer(GlobalDecl GD, llvm::Type *Ty=nullptr)

Return a function pointer for a reference to the given function.

llvm::FunctionCallee getAddrAndTypeOfCXXStructor(GlobalDecl GD, const CGFunctionInfo *FnInfo=nullptr, llvm::FunctionType *FnType=nullptr, bool DontDefer=false, ForDefinition_t IsForDefinition=NotForDefinition)

llvm::Constant * GetAddrOfRTTIDescriptor(QualType Ty, bool ForEH=false)

Get the address of the RTTI descriptor for the given type.

llvm::Constant * GetAddrOfFunction(GlobalDecl GD, llvm::Type *Ty=nullptr, bool ForVTable=false, bool DontDefer=false, ForDefinition_t IsForDefinition=NotForDefinition)

Return the address of the given function.

Address createUnnamedGlobalFrom(const VarDecl &D, llvm::Constant *Constant, CharUnits Align)

void setGVPropertiesAux(llvm::GlobalValue *GV, const NamedDecl *D) const

llvm::Constant * getFunctionPointer(GlobalDecl GD, llvm::Type *Ty=nullptr)

Return the ABI-correct function pointer value for a reference to the given function.

const IntrusiveRefCntPtr< llvm::vfs::FileSystem > & getFileSystem() const

Definition CodeGenModule.h:823

void setAddrOfGlobalBlock(const BlockExpr *BE, llvm::Constant *Addr)

Notes that BE's global block is available via Addr.

const ABIInfo & getABIInfo()

void setStaticLocalDeclGuardAddress(const VarDecl *D, llvm::GlobalVariable *C)

Definition CodeGenModule.h:779

bool ReturnTypeUsesFPRet(QualType ResultType)

Return true iff the given type uses 'fpret' when used as a return type.

void EmitMainVoidAlias()

Emit an alias for "main" if it has no arguments (needed for wasm).

void DecorateInstructionWithInvariantGroup(llvm::Instruction *I, const CXXRecordDecl *RD)

Adds !invariant.barrier !tag to instruction.

TrapReasonBuilder BuildTrapReason(unsigned DiagID, TrapReason &TR)

Helper function to construct a TrapReasonBuilder.

Definition CodeGenModule.h:1839

llvm::Constant * getBuiltinLibFunction(const FunctionDecl *FD, unsigned BuiltinID)

Given a builtin id for a function like "__builtin_fabsf", return a Function* for "fabsf".

DiagnosticsEngine & getDiags() const

Definition CodeGenModule.h:832

bool isInNoSanitizeList(SanitizerMask Kind, llvm::Function *Fn, SourceLocation Loc) const

void runWithSufficientStackSpace(SourceLocation Loc, llvm::function_ref< void()> Fn)

Run some code with "sufficient" stack space.

llvm::Constant * getAddrOfCXXStructor(GlobalDecl GD, const CGFunctionInfo *FnInfo=nullptr, llvm::FunctionType *FnType=nullptr, bool DontDefer=false, ForDefinition_t IsForDefinition=NotForDefinition)

Return the address of the constructor/destructor of the given type.

Definition CodeGenModule.h:1222

void setAtomicOpts(AtomicOptions AO)

Set the current Atomic options.

Definition CodeGenModule.h:706

bool isPaddedAtomicType(QualType type)

llvm::Constant * getNullPointer(llvm::PointerType *T, QualType QT)

Get target specific null pointer.

void AddCXXGlobalInit(llvm::Function *F)

Definition CodeGenModule.h:1244

void ErrorUnsupported(const Stmt *S, const char *Type)

Print out an error that codegen doesn't support the specified stmt yet.

llvm::Constant * EmitAnnotateAttr(llvm::GlobalValue *GV, const AnnotateAttr *AA, SourceLocation L)

Generate the llvm::ConstantStruct which contains the annotation information for a given GlobalValue.

void EmitOpenACCDeclare(const OpenACCDeclareDecl *D, CodeGenFunction *CGF=nullptr)

llvm::GlobalValue::LinkageTypes getLLVMLinkageForDeclarator(const DeclaratorDecl *D, GVALinkage Linkage)

Returns LLVM linkage for a declarator.

TBAAAccessInfo mergeTBAAInfoForMemoryTransfer(TBAAAccessInfo DestInfo, TBAAAccessInfo SrcInfo)

mergeTBAAInfoForMemoryTransfer - Get merged TBAA information for the purposes of memory transfer call...

llvm::Type * getBlockDescriptorType()

Fetches the type of a generic block descriptor.

llvm::Constant * GetAddrOfGlobalBlock(const BlockExpr *BE, StringRef Name)

Gets the address of a block which requires no captures.

llvm::Constant * getAtomicGetterHelperFnMap(QualType Ty)

Definition CodeGenModule.h:798

CGPointerAuthInfo getMemberFunctionPointerAuthInfo(QualType FT)

const LangOptions & getLangOpts() const

Definition CodeGenModule.h:822

CGCUDARuntime & getCUDARuntime()

Return a reference to the configured CUDA runtime.

Definition CodeGenModule.h:735

int getUniqueBlockCount()

Fetches the global unique block count.

Definition CodeGenModule.h:1148

llvm::Constant * EmitAnnotationLineNo(SourceLocation L)

Emit the annotation line number.

QualType getObjCFastEnumerationStateType()

Retrieve the record type that describes the state of an Objective-C fast enumeration loop (for....

CtorList & getGlobalCtors()

Definition CodeGenModule.h:865

CharUnits getNaturalTypeAlignment(QualType T, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr, bool forPointeeType=false)

CodeGenTypes & getTypes()

Definition CodeGenModule.h:849

bool shouldMapVisibilityToDLLExport(const NamedDecl *D) const

Definition CodeGenModule.h:931

CGOpenCLRuntime & getOpenCLRuntime()

Return a reference to the configured OpenCL runtime.

Definition CodeGenModule.h:723

const std::string & getModuleNameHash() const

Definition CodeGenModule.h:720

const TargetInfo & getTarget() const

Definition CodeGenModule.h:836

bool shouldEmitRTTI(bool ForEH=false)

Definition CodeGenModule.h:1081

void EmitGlobal(GlobalDecl D)

Emit code for a single global function or var decl.

llvm::Function * getLLVMFakeUseFn()

Lazily declare the @llvm.fake.use intrinsic.

llvm::GlobalVariable * getStaticLocalDeclGuardAddress(const VarDecl *D)

Definition CodeGenModule.h:776

llvm::ConstantInt * getPointerAuthOtherDiscriminator(const PointerAuthSchema &Schema, GlobalDecl SchemaDecl, QualType SchemaType)

Given a pointer-authentication schema, return a concrete "other" discriminator for it.

llvm::Metadata * CreateMetadataIdentifierForType(QualType T)

Create a metadata identifier for the given type.

llvm::Constant * getTypeDescriptorFromMap(QualType Ty)

Definition CodeGenModule.h:806

llvm::IndexedInstrProfReader * getPGOReader() const

Definition CodeGenModule.h:758

void addUsedGlobal(llvm::GlobalValue *GV)

Add a global to a list to be added to the llvm.used metadata.

void handleAMDGPUFlatWorkGroupSizeAttr(llvm::Function *F, const AMDGPUFlatWorkGroupSizeAttr *A, const ReqdWorkGroupSizeAttr *ReqdWGS=nullptr, int32_t *MinThreadsVal=nullptr, int32_t *MaxThreadsVal=nullptr)

Emit the IR encoding to attach the AMD GPU flat-work-group-size attribute to F.

void createIndirectFunctionTypeMD(const FunctionDecl *FD, llvm::Function *F)

Create and attach type metadata if the function is a potential indirect call target to support call g...

void AppendLinkerOptions(StringRef Opts)

Appends Opts to the "llvm.linker.options" metadata value.

bool hasObjCRuntime()

Return true iff an Objective-C runtime has been configured.

Definition CodeGenModule.h:718

void createCalleeTypeMetadataForIcall(const QualType &QT, llvm::CallBase *CB)

Create and attach type metadata to the given call.

void EmitExternalDeclaration(const DeclaratorDecl *D)

void AddDependentLib(StringRef Lib)

Appends a dependent lib to the appropriate metadata value.

void Release()

Finalize LLVM code generation.

llvm::FunctionCallee IsOSVersionAtLeastFn

Definition CodeGenModule.h:753

ProfileList::ExclusionType isFunctionBlockedByProfileList(llvm::Function *Fn, SourceLocation Loc) const

CGPointerAuthInfo getPointerAuthInfoForPointeeType(QualType type)

llvm::MDNode * getTBAABaseTypeInfo(QualType QTy)

getTBAABaseTypeInfo - Get metadata that describes the given base access type.

CGPointerAuthInfo EmitPointerAuthInfo(const RecordDecl *RD)

void EmitVTableTypeMetadata(const CXXRecordDecl *RD, llvm::GlobalVariable *VTable, const VTableLayout &VTLayout)

Emit type metadata for the given vtable using the given layout.

bool lookupRepresentativeDecl(StringRef MangledName, GlobalDecl &Result) const

void EmitOMPAllocateDecl(const OMPAllocateDecl *D)

Emit a code for the allocate directive.

void setGlobalVisibility(llvm::GlobalValue *GV, const NamedDecl *D) const

Set the visibility for the given LLVM GlobalValue.

CoverageMappingModuleGen * getCoverageMapping() const

Definition CodeGenModule.h:760

llvm::Constant * GetNonVirtualBaseClassOffset(const CXXRecordDecl *ClassDecl, CastExpr::path_const_iterator PathBegin, CastExpr::path_const_iterator PathEnd)

Returns the offset from a derived class to a class.

bool TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D)

Try to emit a base destructor as an alias to its primary base-class destructor.

llvm::GlobalValue::LinkageTypes getLLVMLinkageVarDefinition(const VarDecl *VD)

Returns LLVM linkage for a declarator.

llvm::Constant * getMemberPointerConstant(const UnaryOperator *e)

unsigned getVtableGlobalVarAlignment(const VarDecl *D=nullptr)

Definition CodeGenModule.h:1830

bool HasHiddenLTOVisibility(const CXXRecordDecl *RD)

Returns whether the given record has hidden LTO visibility and therefore may participate in (single-m...

const llvm::DataLayout & getDataLayout() const

Definition CodeGenModule.h:833

llvm::Constant * getNSConcreteGlobalBlock()

void addUndefinedGlobalForTailCall(std::pair< const FunctionDecl *, SourceLocation > Global)

Definition CodeGenModule.h:1773

CharUnits computeNonVirtualBaseClassOffset(const CXXRecordDecl *DerivedClass, CastExpr::path_const_iterator Start, CastExpr::path_const_iterator End)

ObjCEntrypoints & getObjCEntrypoints() const

Definition CodeGenModule.h:746

int GlobalUniqueCount

Definition CodeGenModule.h:638

TBAAAccessInfo getTBAAVTablePtrAccessInfo(llvm::Type *VTablePtrType)

getTBAAVTablePtrAccessInfo - Get the TBAA information that describes an access to a virtual table poi...

bool shouldEmitConvergenceTokens() const

Definition CodeGenModule.h:1767

CGCXXABI & getCXXABI() const

Definition CodeGenModule.h:842

ConstantAddress GetWeakRefReference(const ValueDecl *VD)

Get a reference to the target of VD.

CGPointerAuthInfo getFunctionPointerAuthInfo(QualType T)

Return the abstract pointer authentication schema for a pointer to the given function type.

CharUnits getVBaseAlignment(CharUnits DerivedAlign, const CXXRecordDecl *Derived, const CXXRecordDecl *VBase)

Returns the assumed alignment of a virtual base of a class.

llvm::Constant * GetFunctionStart(const ValueDecl *Decl)

llvm::GlobalVariable * getAddrOfConstantCompoundLiteralIfEmitted(const CompoundLiteralExpr *E)

If it's been emitted already, returns the GlobalVariable corresponding to a compound literal.

static llvm::GlobalValue::VisibilityTypes GetLLVMVisibility(Visibility V)

Definition CodeGenModule.h:955

void EmitTentativeDefinition(const VarDecl *D)

bool ReturnTypeUsesFP2Ret(QualType ResultType)

Return true iff the given type uses 'fp2ret' when used as a return type.

void EmitDeferredUnusedCoverageMappings()

Emit all the deferred coverage mappings for the uninstrumented functions.

void addUsedOrCompilerUsedGlobal(llvm::GlobalValue *GV)

Add a global to a list to be added to the llvm.compiler.used metadata.

CGOpenMPRuntime & getOpenMPRuntime()

Return a reference to the configured OpenMP runtime.

Definition CodeGenModule.h:729

bool imbueXRayAttrs(llvm::Function *Fn, SourceLocation Loc, StringRef Category=StringRef()) const

Imbue XRay attributes to a function, applying the always/never attribute lists in the process.

llvm::Constant * getMemberFunctionPointer(const FunctionDecl *FD, llvm::Type *Ty=nullptr)

SanitizerMetadata * getSanitizerMetadata()

Definition CodeGenModule.h:1537

void EmitDefinitionAsAlias(GlobalDecl Alias, GlobalDecl Target)

Emit a definition as a global alias for another definition, unconditionally.

llvm::Metadata * CreateMetadataIdentifierGeneralized(QualType T)

Create a metadata identifier for the generalization of the given type.

void EmitGlobalAnnotations()

Emit all the global annotations.

llvm::Constant * getAddrOfGlobalBlockIfEmitted(const BlockExpr *BE)

Returns the address of a block which requires no caputres, or null if we've yet to emit the block for...

Definition CodeGenModule.h:1161

std::optional< PointerAuthQualifier > getVTablePointerAuthentication(const CXXRecordDecl *thisClass)

llvm::Function * codegenCXXStructor(GlobalDecl GD)

CharUnits getClassPointerAlignment(const CXXRecordDecl *CD)

Returns the assumed alignment of an opaque pointer to the given class.

const llvm::Triple & getTriple() const

Definition CodeGenModule.h:837

void setAtomicSetterHelperFnMap(QualType Ty, llvm::Constant *Fn)

Definition CodeGenModule.h:793

llvm::Constant * getOrCreateStaticVarDecl(const VarDecl &D, llvm::GlobalValue::LinkageTypes Linkage)

SmallVector< const CXXRecordDecl *, 0 > getMostBaseClasses(const CXXRecordDecl *RD)

Return a vector of most-base classes for RD.

void AddDeferredUnusedCoverageMapping(Decl *D)

Stored a deferred empty coverage mapping for an unused and thus uninstrumented top level declaration.

bool AlwaysHasLTOVisibilityPublic(const CXXRecordDecl *RD)

Returns whether the given record has public LTO visibility (regardless of -lto-whole-program-visibili...

void MaybeHandleStaticInExternC(const SomeDecl *D, llvm::GlobalValue *GV)

If the declaration has internal linkage but is inside an extern "C" linkage specification,...

void DecorateInstructionWithTBAA(llvm::Instruction *Inst, TBAAAccessInfo TBAAInfo)

DecorateInstructionWithTBAA - Decorate the instruction with a TBAA tag.

uint16_t getPointerAuthDeclDiscriminator(GlobalDecl GD)

Return the "other" decl-specific discriminator for the given decl.

llvm::Constant * getAtomicSetterHelperFnMap(QualType Ty)

Definition CodeGenModule.h:790

TBAAAccessInfo getTBAAInfoForSubobject(LValue Base, QualType AccessType)

getTBAAInfoForSubobject - Get TBAA information for an access with a given base lvalue.

Definition CodeGenModule.h:906

bool shouldUseTBAA() const

Definition CodeGenModule.h:845

llvm::GlobalVariable::LinkageTypes getFunctionLinkage(GlobalDecl GD)

void AddGlobalDtor(llvm::Function *Dtor, int Priority=65535, bool IsDtorAttrFunc=false)

AddGlobalDtor - Add a function to the list that will be called when the module is unloaded.

bool ReturnSlotInterferesWithArgs(const CGFunctionInfo &FI)

Return true iff the given type uses an argument slot when 'sret' is used as a return type.

bool ReturnTypeHasInReg(const CGFunctionInfo &FI)

Return true iff the given type has inreg set.

void EmitVTable(CXXRecordDecl *Class)

This is a callback from Sema to tell us that a particular vtable is required to be emitted in this tr...

llvm::Constant * CreateRuntimeVariable(llvm::Type *Ty, StringRef Name)

Create a new runtime global variable with the specified type and name.

void AdjustMemoryAttribute(StringRef Name, CGCalleeInfo CalleeInfo, llvm::AttributeList &Attrs)

Adjust Memory attribute to ensure that the BE gets the right attribute.

void ConstructAttributeList(StringRef Name, const CGFunctionInfo &Info, CGCalleeInfo CalleeInfo, llvm::AttributeList &Attrs, unsigned &CallingConv, bool AttrOnCallSite, bool IsThunk)

Get the LLVM attributes and calling convention to use for a particular function type.

CharUnits getDynamicOffsetAlignment(CharUnits ActualAlign, const CXXRecordDecl *Class, CharUnits ExpectedTargetAlign)

Given a class pointer with an actual known alignment, and the expected alignment of an object at a dy...

llvm::Constant * GetOrCreateLLVMGlobal(StringRef MangledName, llvm::Type *Ty, LangAS AddrSpace, const VarDecl *D, ForDefinition_t IsForDefinition=NotForDefinition)

GetOrCreateLLVMGlobal - If the specified mangled name is not in the module, create and return an llvm...

TBAAAccessInfo getTBAAAccessInfo(QualType AccessType)

getTBAAAccessInfo - Get TBAA information that describes an access to an object of the given type.

void setFunctionLinkage(GlobalDecl GD, llvm::Function *F)

Definition CodeGenModule.h:1464

llvm::Constant * GetAddrOfGlobal(GlobalDecl GD, ForDefinition_t IsForDefinition=NotForDefinition)

AtomicOptions getAtomicOpts()

Get the current Atomic options.

Definition CodeGenModule.h:703

ConstantAddress GetAddrOfConstantCFString(const StringLiteral *Literal)

Return a pointer to a constant CFString object for the given string.

InstrProfStats & getPGOStats()

Definition CodeGenModule.h:757

ProfileList::ExclusionType isFunctionBlockedFromProfileInstr(llvm::Function *Fn, SourceLocation Loc) const

void AddGlobalAnnotations(const ValueDecl *D, llvm::GlobalValue *GV)

Add global annotations that are set on D, for the global GV.

void setTLSMode(llvm::GlobalValue *GV, const VarDecl &D) const

Set the TLS mode for the given LLVM GlobalValue for the thread-local variable declaration D.

ItaniumVTableContext & getItaniumVTableContext()

Definition CodeGenModule.h:853

ConstantAddress GetAddrOfConstantStringFromLiteral(const StringLiteral *S, StringRef Name=".str")

Return a pointer to a constant array for the given string literal.

ASTContext & getContext() const

Definition CodeGenModule.h:821

ConstantAddress GetAddrOfTemplateParamObject(const TemplateParamObjectDecl *TPO)

Get the address of a template parameter object.

void EmitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *D)

Emit a code for threadprivate directive.

llvm::Constant * getNSConcreteStackBlock()

ConstantAddress GetAddrOfUnnamedGlobalConstantDecl(const UnnamedGlobalConstantDecl *GCD)

Get the address of a UnnamedGlobalConstant.

TBAAAccessInfo mergeTBAAInfoForCast(TBAAAccessInfo SourceInfo, TBAAAccessInfo TargetInfo)

mergeTBAAInfoForCast - Get merged TBAA information for the purposes of type casts.

llvm::Constant * GetAddrOfGlobalVar(const VarDecl *D, llvm::Type *Ty=nullptr, ForDefinition_t IsForDefinition=NotForDefinition)

Return the llvm::Constant for the address of the given global variable.

MicrosoftVTableContext & getMicrosoftVTableContext()

Definition CodeGenModule.h:861

const HeaderSearchOptions & getHeaderSearchOpts() const

Definition CodeGenModule.h:826

llvm::SanitizerStatReport & getSanStats()

llvm::Constant * EmitAnnotationString(StringRef Str)

Emit an annotation string.

llvm::Type * getVTableComponentType() const

void EmitOMPDeclareMapper(const OMPDeclareMapperDecl *D, CodeGenFunction *CGF=nullptr)

Emit a code for declare mapper construct.

llvm::Function * getLLVMLifetimeEndFn()

Lazily declare the @llvm.lifetime.end intrinsic.

bool supportsCOMDAT() const

void RefreshTypeCacheForClass(const CXXRecordDecl *Class)

llvm::MDNode * getTBAATypeInfo(QualType QTy)

getTBAATypeInfo - Get metadata used to describe accesses to objects of the given type.

void setAddrOfConstantCompoundLiteral(const CompoundLiteralExpr *CLE, llvm::GlobalVariable *GV)

Notes that CLE's GlobalVariable is GV.

void EmitOMPRequiresDecl(const OMPRequiresDecl *D)

Emit a code for requires directive.

void HandleCXXStaticMemberVarInstantiation(VarDecl *VD)

Tell the consumer that this variable has been instantiated.

bool ReturnTypeUsesSRet(const CGFunctionInfo &FI)

Return true iff the given type uses 'sret' when used as a return type.

const TargetCodeGenInfo & getTargetCodeGenInfo()

const CodeGenOptions & getCodeGenOpts() const

Definition CodeGenModule.h:830

StringRef getMangledName(GlobalDecl GD)

llvm::Constant * GetConstantArrayFromStringLiteral(const StringLiteral *E)

Return a constant array for the given string.

void SetCommonAttributes(GlobalDecl GD, llvm::GlobalValue *GV)

Set attributes which are common to any form of a global definition (alias, Objective-C method,...

void addDefaultFunctionDefinitionAttributes(llvm::AttrBuilder &attrs)

Like the overload taking a Function &, but intended specifically for frontends that want to build on ...

std::optional< CharUnits > getOMPAllocateAlignment(const VarDecl *VD)

Return the alignment specified in an allocate directive, if present.

llvm::GlobalVariable * CreateOrReplaceCXXRuntimeVariable(StringRef Name, llvm::Type *Ty, llvm::GlobalValue::LinkageTypes Linkage, llvm::Align Alignment)

Will return a global variable of the given type.

llvm::FunctionCallee getTerminateFn()

Get the declaration of std::terminate for the platform.

CharUnits getNaturalPointeeTypeAlignment(QualType T, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr)

llvm::FunctionCallee getBlockObjectDispose()

TBAAAccessInfo mergeTBAAInfoForConditionalOperator(TBAAAccessInfo InfoA, TBAAAccessInfo InfoB)

mergeTBAAInfoForConditionalOperator - Get merged TBAA information for the purposes of conditional ope...

llvm::LLVMContext & getLLVMContext()

Definition CodeGenModule.h:843

llvm::GlobalValue * GetGlobalValue(StringRef Ref)

bool shouldZeroInitPadding() const

Definition CodeGenModule.h:1778

void GenKernelArgMetadata(llvm::Function *FN, const FunctionDecl *FD=nullptr, CodeGenFunction *CGF=nullptr)

OpenCL v1.2 s5.6.4.6 allows the compiler to store kernel argument information in the program executab...

void setKCFIType(const FunctionDecl *FD, llvm::Function *F)

Set type metadata to the given function.

void setAtomicGetterHelperFnMap(QualType Ty, llvm::Constant *Fn)

Definition CodeGenModule.h:801

void maybeSetTrivialComdat(const Decl &D, llvm::GlobalObject &GO)

void EmitOMPDeclareReduction(const OMPDeclareReductionDecl *D, CodeGenFunction *CGF=nullptr)

Emit a code for declare reduction construct.

const ItaniumVTableContext & getItaniumVTableContext() const

Definition CodeGenModule.h:857

llvm::Function * getIntrinsic(unsigned IID, ArrayRef< llvm::Type * > Tys={})

void AddDetectMismatch(StringRef Name, StringRef Value)

Appends a detect mismatch command to the linker options.

void setDLLImportDLLExport(llvm::GlobalValue *GV, GlobalDecl D) const

CGObjCRuntime & getObjCRuntime()

Return a reference to the configured Objective-C runtime.

Definition CodeGenModule.h:712

llvm::Value * createOpenCLIntToSamplerConversion(const Expr *E, CodeGenFunction &CGF)

ConstantAddress GetAddrOfGlobalTemporary(const MaterializeTemporaryExpr *E, const Expr *Inner)

Returns a pointer to a global variable representing a temporary with static or thread storage duratio...

llvm::Constant * EmitNullConstant(QualType T)

Return the result of value-initializing the given type, i.e.

LangAS GetGlobalConstantAddressSpace() const

Return the AST address space of constant literal, which is used to emit the constant literal as globa...

LangAS GetGlobalVarAddressSpace(const VarDecl *D)

Return the AST address space of the underlying global variable for D, as determined by its declaratio...

llvm::GlobalVariable::LinkageTypes getVTableLinkage(const CXXRecordDecl *RD)

Return the appropriate linkage for the vtable, VTT, and type information of the given class.

void SetLLVMFunctionAttributes(GlobalDecl GD, const CGFunctionInfo &Info, llvm::Function *F, bool IsThunk)

Set the LLVM function attributes (sext, zext, etc).

void addDeferredVTable(const CXXRecordDecl *RD)

Definition CodeGenModule.h:1541

llvm::Type * getGenericBlockLiteralType()

The type of a generic block literal.

void EmitOpenACCRoutine(const OpenACCRoutineDecl *D, CodeGenFunction *CGF=nullptr)

CharUnits getMinimumObjectSize(QualType Ty)

Returns the minimum object size for an object of the given type.

Definition CodeGenModule.h:1115

void addReplacement(StringRef Name, llvm::Constant *C)

std::optional< CGPointerAuthInfo > getVTablePointerAuthInfo(CodeGenFunction *Context, const CXXRecordDecl *Record, llvm::Value *StorageAddress)

llvm::Constant * getConstantSignedPointer(llvm::Constant *Pointer, const PointerAuthSchema &Schema, llvm::Constant *StorageAddress, GlobalDecl SchemaDecl, QualType SchemaType)

Sign a constant pointer using the given scheme, producing a constant with the same IR type.

llvm::FunctionCallee IsPlatformVersionAtLeastFn

Definition CodeGenModule.h:755

void AddGlobalCtor(llvm::Function *Ctor, int Priority=65535, unsigned LexOrder=~0U, llvm::Constant *AssociatedData=nullptr)

AddGlobalCtor - Add a function to the list that will be called before main() runs.

llvm::Metadata * CreateMetadataIdentifierForFnType(QualType T)

Create a metadata identifier for the given function type.

bool shouldSignPointer(const PointerAuthSchema &Schema)

Does a given PointerAuthScheme require us to sign a value.

void SetLLVMFunctionAttributesForDefinition(const Decl *D, llvm::Function *F)

Set the LLVM function attributes which only apply to a function definition.

llvm::Metadata * CreateMetadataIdentifierForVirtualMemPtrType(QualType T)

Create a metadata identifier that is intended to be used to check virtual calls via a member function...

llvm::Constant * getStaticLocalDeclAddress(const VarDecl *D)

Definition CodeGenModule.h:764

bool MayDropFunctionReturn(const ASTContext &Context, QualType ReturnType) const

Whether this function's return type has no side effects, and thus may be trivially discarded if it is...

ConstantAddress GetAddrOfConstantStringFromObjCEncode(const ObjCEncodeExpr *)

Return a pointer to a constant array for the given ObjCEncodeExpr node.

const GlobalDecl getMangledNameDecl(StringRef)

void ClearUnusedCoverageMapping(const Decl *D)

Remove the deferred empty coverage mapping as this declaration is actually instrumented.

void EmitTopLevelDecl(Decl *D)

Emit code for a single top level declaration.

llvm::Function * CreateGlobalInitOrCleanUpFunction(llvm::FunctionType *ty, const Twine &name, const CGFunctionInfo &FI, SourceLocation Loc=SourceLocation(), bool TLS=false, llvm::GlobalVariable::LinkageTypes Linkage=llvm::GlobalVariable::InternalLinkage)

llvm::Constant * EmitAnnotationUnit(SourceLocation Loc)

Emit the annotation's translation unit.

CGPointerAuthInfo getPointerAuthInfoForType(QualType type)

ConstantAddress GetAddrOfConstantCString(const std::string &Str, StringRef GlobalName=".str")

Returns a pointer to a character array containing the literal and a terminating '\0' character.

std::vector< Structor > CtorList

Definition CodeGenModule.h:345

void printPostfixForExternalizedDecl(llvm::raw_ostream &OS, const Decl *D) const

Print the postfix for externalized static variable or kernels for single source offloading languages ...

llvm::Constant * GetAddrOfThunk(StringRef Name, llvm::Type *FnTy, GlobalDecl GD)

Get the address of the thunk for the given global decl.

void moveLazyEmissionStates(CodeGenModule *NewBuilder)

Move some lazily-emitted states to the NewBuilder.

llvm::ConstantInt * getSize(CharUnits numChars)

Emit the given number of characters as a value of type size_t.

void finalizeKCFITypes()

Emit KCFI type identifier constants and remove unused identifiers.

CodeGenTBAA - This class organizes the cross-module state that is used while lowering AST types to LL...

This class organizes the cross-module state that is used while lowering AST types to LLVM types.

A specialization of Address that requires the address to be an LLVM Constant.

Optional value.

Definition CodeGenModule.h:120

ValueOpt()

Definition CodeGenModule.h:128

bool hasValue() const

Definition CodeGenModule.h:135

ValueOpt(unsigned InitVal)

Definition CodeGenModule.h:130

ValueOpt Skipped

Definition CodeGenModule.h:141

CounterPair(unsigned Val)

May be None.

Definition CodeGenModule.h:144

ValueOpt Executed

Definition CodeGenModule.h:140

CounterPair()

Definition CodeGenModule.h:147

Organizes the cross-function state that is used while generating code coverage mapping data.

This class records statistics on instrumentation based profiling.

Definition CodeGenModule.h:263

bool hasDiagnostics()

Whether or not the stats we've gathered indicate any potential problems.

Definition CodeGenModule.h:288

void addMissing(bool MainFile)

Record that a function we've visited has no profile data.

Definition CodeGenModule.h:280

void addMismatched(bool MainFile)

Record that a function we've visited has mismatched profile data.

Definition CodeGenModule.h:286

void addVisited(bool MainFile)

Record that we've visited a function and whether or not that function was in the main source file.

Definition CodeGenModule.h:274

void reportDiagnostics(DiagnosticsEngine &Diags, StringRef MainFile)

Report potential problems we've found to Diags.

LValue - This represents an lvalue references.

TargetCodeGenInfo - This class organizes various target-specific codegeneration issues,...

Helper class for stores the "trap reason" built by.

CompoundLiteralExpr - [C99 6.5.2.5].

Stores additional source code information like skipped ranges which is required by the coverage mappi...

DeclContext - This is used only as base class of specific decl types that can act as declaration cont...

Decl - This represents one declaration (or definition), e.g.

Represents a ValueDecl that came out of a declarator.

Concrete class used by the front-end to report problems and issues.

ExplicitCastExpr - An explicit cast written in the source code.

This represents one expression.

Represents a function declaration or definition.

FunctionType - C99 6.7.5.3 - Function Declarators.

GlobalDecl - represents a global declaration.

const Decl * getDecl() const

One of these records is kept for each identifier that is lexed.

bool isRelativeLayout() const

Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...

bool hasDefaultVisibilityExportMapping() const

bool isExplicitDefaultVisibilityExportMapping() const

bool isAllDefaultVisibilityExportMapping() const

bool isTargetDevice() const

True when compiling for an offloading target device.

bool isVisibilityExplicit() const

Represents a linkage specification.

Represents a prvalue temporary that is written into memory so that a reference can bind to it.

Describes a module or submodule.

This represents a decl that may have a name.

LinkageInfo getLinkageAndVisibility() const

Determines the linkage and visibility of this entity.

This represents 'pragma omp allocate ...' directive.

This represents 'pragma omp declare mapper ...' directive.

This represents 'pragma omp declare reduction ...' directive.

This represents 'pragma omp requires...' directive.

This represents 'pragma omp threadprivate ...' directive.

ObjCEncodeExpr, used for @encode in Objective-C.

ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...

PreprocessorOptions - This class is used for passing the various options used in preprocessor initial...

ExclusionType

Represents if an how something should be excluded from profiling.

A (possibly-)qualified type.

Represents a struct/union/class.

Encodes a location in the source.

Stmt - This represents one statement.

StringLiteral - This represents a string literal expression, e.g.

Represents the declaration of a struct/union/class/enum.

Exposes information about the current target.

uint64_t getPointerAlign(LangAS AddrSpace) const

A template parameter object.

A declaration that models statements at global scope.

CXXRecordDecl * getAsCXXRecordDecl() const

Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...

UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...

An artificial decl, representing a global anonymous constant value which is uniquified by value withi...

Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...

Represents a variable declaration or definition.

Defines the clang::TargetInfo interface.

@ Type

The l-value was considered opaque, so the alignment was determined from a type.

@ Decl

The l-value was an access to a declared entity or something equivalently strong, like the address of ...

ForDefinition_t

Definition CodeGenModule.h:101

@ NotForDefinition

Definition CodeGenModule.h:102

@ ForDefinition

Definition CodeGenModule.h:103

const internal::VariadicAllOfMatcher< Type > type

Matches Types in the clang AST.

static const FunctionDecl * getCallee(const CXXConstructExpr &D)

The JSON file list parser is used to communicate input to InstallAPI.

GVALinkage

A more specific kind of linkage than enum Linkage.

nullptr

This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...

Linkage

Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.

@ Module

Module linkage, which indicates that the entity can be referred to from other translation units withi...

@ Result

The result type of a method or function.

const FunctionProtoType * T

LangAS

Defines the address space values used by the address space qualifier of QualType.

CallingConv

CallingConv - Specifies the calling convention that a function uses.

U cast(CodeGen::Address addr)

@ Class

The "class" keyword introduces the elaborated-type-specifier.

Visibility

Describes the different kinds of visibility that a declaration may have.

@ HiddenVisibility

Objects with "hidden" visibility are not seen by the dynamic linker.

@ ProtectedVisibility

Objects with "protected" visibility are seen by the dynamic linker but always dynamically resolve to ...

@ DefaultVisibility

Objects with "default" visibility are seen by the dynamic linker and act like normal objects.

Diagnostic wrappers for TextAPI types for error reporting.

llvm::Constant * Initializer

Definition CodeGenModule.h:341

Structor()

Definition CodeGenModule.h:332

Structor(int Priority, unsigned LexOrder, llvm::Constant *Initializer, llvm::Constant *AssociatedData)

Definition CodeGenModule.h:335

llvm::Constant * AssociatedData

Definition CodeGenModule.h:342

unsigned LexOrder

Definition CodeGenModule.h:340

int Priority

Definition CodeGenModule.h:339

This structure provides a set of types that are commonly used during IR emission.

Definition CodeGenModule.h:166

llvm::Function * objc_retainAutoreleasedReturnValue

id objc_retainAutoreleasedReturnValue(id);

Definition CodeGenModule.h:230

llvm::Function * objc_retainAutoreleaseReturnValue

id objc_retainAutoreleaseReturnValue(id);

Definition CodeGenModule.h:227

llvm::FunctionCallee objc_alloc

void objc_alloc(id);

Definition CodeGenModule.h:170

llvm::Function * objc_retain

id objc_retain(id);

Definition CodeGenModule.h:217

llvm::FunctionCallee objc_alloc_init

void objc_alloc_init(id);

Definition CodeGenModule.h:176

llvm::Function * objc_autorelease

id objc_autorelease(id);

Definition CodeGenModule.h:189

llvm::Function * objc_moveWeak

void objc_moveWeak(id *dest, id *src);

Definition CodeGenModule.h:214

llvm::FunctionCallee objc_autoreleasePoolPopInvoke

void objc_autoreleasePoolPop(void*); Note this method is used when we are using exception handling

Definition CodeGenModule.h:183

llvm::InlineAsm * retainAutoreleasedReturnValueMarker

A void(void) inline asm to use to mark that the return value of a call will be immediately retain.

Definition CodeGenModule.h:253

llvm::Function * clang_arc_use

void clang.arc.use(...);

Definition CodeGenModule.h:256

llvm::Function * objc_initWeak

id objc_initWeak(id*, id);

Definition CodeGenModule.h:205

llvm::FunctionCallee objc_retainRuntimeFunction

id objc_retain(id); Note this is the runtime method not the intrinsic.

Definition CodeGenModule.h:221

llvm::Function * objc_copyWeak

void objc_copyWeak(id *dest, id *src);

Definition CodeGenModule.h:199

llvm::Function * objc_destroyWeak

void objc_destroyWeak(id*);

Definition CodeGenModule.h:202

ObjCEntrypoints()

Definition CodeGenModule.h:167

llvm::Function * objc_retainAutorelease

id objc_retainAutorelease(id);

Definition CodeGenModule.h:224

llvm::Function * objc_autoreleasePoolPush

void *objc_autoreleasePoolPush(void);

Definition CodeGenModule.h:186

llvm::Function * objc_retainBlock

id objc_retainBlock(id);

Definition CodeGenModule.h:233

llvm::Function * objc_storeStrong

void objc_storeStrong(id*, id);

Definition CodeGenModule.h:243

llvm::Function * objc_loadWeak

id objc_loadWeak(id*);

Definition CodeGenModule.h:208

llvm::Function * clang_arc_noop_use

void clang.arc.noop.use(...);

Definition CodeGenModule.h:259

llvm::Function * objc_loadWeakRetained

id objc_loadWeakRetained(id*);

Definition CodeGenModule.h:211

llvm::Function * objc_release

void objc_release(id);

Definition CodeGenModule.h:236

llvm::FunctionCallee objc_autoreleaseRuntimeFunction

id objc_autorelease(id); Note this is the runtime method not the intrinsic.

Definition CodeGenModule.h:193

llvm::Function * objc_autoreleaseReturnValue

id objc_autoreleaseReturnValue(id);

Definition CodeGenModule.h:196

llvm::FunctionCallee objc_releaseRuntimeFunction

void objc_release(id); Note this is the runtime method not the intrinsic.

Definition CodeGenModule.h:240

llvm::FunctionCallee objc_allocWithZone

void objc_allocWithZone(id);

Definition CodeGenModule.h:173

llvm::FunctionCallee objc_autoreleasePoolPop

void objc_autoreleasePoolPop(void*);

Definition CodeGenModule.h:179

llvm::Function * objc_storeWeak

id objc_storeWeak(id*, id);

Definition CodeGenModule.h:246

llvm::Function * objc_unsafeClaimAutoreleasedReturnValue

id objc_unsafeClaimAutoreleasedReturnValue(id);

Definition CodeGenModule.h:249

Definition CodeGenModule.h:150

bool operator<(const OrderGlobalInitsOrStermFinalizers &RHS) const

Definition CodeGenModule.h:160

bool operator==(const OrderGlobalInitsOrStermFinalizers &RHS) const

Definition CodeGenModule.h:156

unsigned int lex_order

Definition CodeGenModule.h:152

OrderGlobalInitsOrStermFinalizers(unsigned int p, unsigned int l)

Definition CodeGenModule.h:153

unsigned int priority

Definition CodeGenModule.h:151

static TBAAAccessInfo getMayAliasInfo()