aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorAntonio Frighetto <me@antoniofrighetto.com>2023-07-24 09:23:31 +0200
committerAntonio Frighetto <me@antoniofrighetto.com>2023-07-24 09:24:59 +0200
commit2dea969d8337251e4c9335fd601bd4e0e5dee10f (patch)
tree275df478dd8aa2ed40d3d9fc7be4c29b3aa27a96 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentd7c6d057efa1ebe6fdd878f12f75bc52b8cd933e (diff)
downloadllvm-2dea969d8337251e4c9335fd601bd4e0e5dee10f.zip
llvm-2dea969d8337251e4c9335fd601bd4e0e5dee10f.tar.gz
llvm-2dea969d8337251e4c9335fd601bd4e0e5dee10f.tar.bz2
[clang][CodeGen] Introduce `-frecord-command-line` for MachO
Allow clang driver command-line recording when targeting MachO object files as well. Reviewed-by: sgraenitz Differential Revision: https://reviews.llvm.org/D155716
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 9e0914f..3994552 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -1420,6 +1420,11 @@ MCSection *TargetLoweringObjectFileMachO::getSectionForConstant(
return ReadOnlySection; // .const
}
+MCSection *TargetLoweringObjectFileMachO::getSectionForCommandLines() const {
+ return getContext().getMachOSection("__TEXT", "__command_line", 0,
+ SectionKind::getReadOnly());
+}
+
const MCExpr *TargetLoweringObjectFileMachO::getTTypeGlobalReference(
const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
MachineModuleInfo *MMI, MCStreamer &Streamer) const {