From 4a5ddf8038a58ea1c05f83601a9cea445ca288bb Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Fri, 14 Apr 2017 17:48:40 +0000 Subject: [Profile] Make host tool aware of object format when quering prof section names Differential Revision: https://reviews.llvm.org/D32073 llvm-svn: 300352 --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp') diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 2de5d1b..8ce4dfd 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -132,10 +132,8 @@ getELFKindForNamedSection(StringRef Name, SectionKind K) { // section(".eh_frame") gcc will produce: // // .section .eh_frame,"a",@progbits - - // TODO: to support Win->ELF cross compilation with coverage properly, - // need to pass the module pointer to the following call. - if (Name == getInstrProfCoverageSectionName()) + + if (Name == getInstrProfCoverageSectionNameInObject(false /*not coff*/)) return SectionKind::getMetadata(); if (Name.empty() || Name[0] != '.') return K; -- cgit v1.1