From 750e855641be2131b3189d0310e5cc4610c4020d Mon Sep 17 00:00:00 2001 From: Xiangling Liao Date: Wed, 20 Nov 2019 11:26:08 -0500 Subject: A fix of the bug introduced by previous lowering in asm patch. Differential Revision: https://reviews.llvm.org/D70243 --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp') diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 34ed476112f9..ee9d388131f1 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -1905,8 +1905,7 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForConstant( const DataLayout &DL, SectionKind Kind, const Constant *C, unsigned &Align) const { //TODO: Enable emiting constant pool to unique sections when we support it. - if (Kind.isReadOnly() && ReadOnlySection != nullptr) - return ReadOnlySection; + return ReadOnlySection; } void TargetLoweringObjectFileXCOFF::Initialize(MCContext &Ctx, -- cgit v1.2.3