summaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/MachObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp
index fb8e1fdf62f5..3291dd774c1e 100644
--- a/llvm/lib/MC/MachObjectWriter.cpp
+++ b/llvm/lib/MC/MachObjectWriter.cpp
@@ -799,7 +799,7 @@ uint64_t MachObjectWriter::writeObject() {
if (!CGProfile.empty()) {
MCSection *CGProfileSection = getContext().getMachOSection(
"__LLVM", "__cg_profile", 0, SectionKind::getMetadata());
- auto &Frag = cast<MCDataFragment>(*CGProfileSection->begin());
+ auto &Frag = *CGProfileSection->begin();
Frag.clearContents();
raw_svector_ostream OS(Frag.getContentsForAppending());
for (const MCObjectWriter::CGProfileEntry &CGPE : CGProfile) {