[llvm] 750e855 - A fix of the bug introduced by previous lowering in asm patch.

Xiangling Liao via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 08:29:43 PST 2019


Author: Xiangling Liao
Date: 2019-11-20T11:29:10-05:00
New Revision: 750e855641be2131b3189d0310e5cc4610c4020d

URL: https://github.com/llvm/llvm-project/commit/750e855641be2131b3189d0310e5cc4610c4020d
DIFF: https://github.com/llvm/llvm-project/commit/750e855641be2131b3189d0310e5cc4610c4020d.diff

LOG: A fix of the bug introduced by previous lowering in asm patch.

Differential Revision: https://reviews.llvm.org/D70243

Added: 
    

Modified: 
    llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

Removed: 
    


################################################################################
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,


        


More information about the llvm-commits mailing list