From e4dcecd006bb4bf1fc7fc942fa9f9c8c17a344d3 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Mon, 13 Jul 2009 21:27:19 +0000 Subject: As Chris pointed out, this doesn't actually need an LLVMContext to operate. llvm-svn: 75508 --- llvm/lib/Target/TargetAsmInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Target/TargetAsmInfo.cpp') diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp index 3df09bc60a5..08ae2cf13e4 100644 --- a/llvm/lib/Target/TargetAsmInfo.cpp +++ b/llvm/lib/Target/TargetAsmInfo.cpp @@ -171,11 +171,11 @@ static bool isSuitableForBSS(const GlobalVariable *GV) { return (C->isNullValue() && !GV->isConstant() && !NoZerosInBSS); } -static bool isConstantString(LLVMContext &Context, const Constant *C) { +static bool isConstantString(const Constant *C) { // First check: is we have constant array of i8 terminated with zero const ConstantArray *CVA = dyn_cast(C); // Check, if initializer is a null-terminated string - if (CVA && CVA->isCString(Context)) + if (CVA && CVA->isCString()) return true; // Another possibility: [1 x i8] zeroinitializer @@ -230,7 +230,7 @@ TargetAsmInfo::SectionKindForGlobal(const GlobalValue *GV) const { } } else { // Check, if initializer is a null-terminated string - if (isConstantString(GV->getParent()->getContext(), C)) + if (isConstantString(C)) return SectionKind::RODataMergeStr; else return SectionKind::RODataMergeConst; -- cgit v1.2.3