[all-commits] [llvm/llvm-project] f808ab: [MC] Add MCFragment allocation helpers

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Jun 14 09:39:54 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f808abf508a6b890b40fc2594ea36ce896bb1f37
      https://github.com/llvm/llvm-project/commit/f808abf508a6b890b40fc2594ea36ce896bb1f37
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-06-14 (Fri, 14 Jun 2024)

  Changed paths:
    M llvm/include/llvm/MC/MCCodeView.h
    M llvm/include/llvm/MC/MCContext.h
    M llvm/lib/MC/MCAssembler.cpp
    M llvm/lib/MC/MCCodeView.cpp
    M llvm/lib/MC/MCContext.cpp
    M llvm/lib/MC/MCELFStreamer.cpp
    M llvm/lib/MC/MCMachOStreamer.cpp
    M llvm/lib/MC/MCObjectStreamer.cpp
    M llvm/lib/MC/MCPseudoProbe.cpp
    M llvm/lib/MC/MCWinCOFFStreamer.cpp
    M llvm/lib/MC/WinCOFFObjectWriter.cpp
    M llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp

  Log Message:
  -----------
  [MC] Add MCFragment allocation helpers

`allocFragment` might be changed to a placement new when the allocation
strategy changes.

`allocInitialFragment` is to deduplicate the following pattern
```
  auto *F = new MCDataFragment();
  Result->addFragment(*F);
  F->setParent(Result);
```

Pull Request: https://github.com/llvm/llvm-project/pull/95197



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list