diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-13 21:27:19 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-13 21:27:19 +0000 |
commit | e4dcecd006bb4bf1fc7fc942fa9f9c8c17a344d3 (patch) | |
tree | 97c2de197484ba2484e3b9d3ccf8340a23c1a91e /llvm/lib/Target/TargetAsmInfo.cpp | |
parent | b4c9579e6912dbdb44803bcdecc43d2233c908c3 (diff) | |
download | bcm5719-llvm-e4dcecd006bb4bf1fc7fc942fa9f9c8c17a344d3.tar.gz bcm5719-llvm-e4dcecd006bb4bf1fc7fc942fa9f9c8c17a344d3.zip |
As Chris pointed out, this doesn't actually need an LLVMContext to operate.
llvm-svn: 75508
Diffstat (limited to 'llvm/lib/Target/TargetAsmInfo.cpp')
-rw-r--r-- | llvm/lib/Target/TargetAsmInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<ConstantArray>(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; |