From cf9e8f6968af1e5871b535a06a6bff45de49e4bf Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 5 Feb 2012 02:29:43 +0000 Subject: reapply the patches reverted in r149470 that reenable ConstantDataArray, but with a critical fix to the SelectionDAG code that optimizes copies from strings into immediate stores: the previous code was stopping reading string data at the first nul. Address this by adding a new argument to llvm::getConstantStringInfo, preserving the behavior before the patch. llvm-svn: 149800 --- llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/ValueEnumerator.cpp') diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 1c4d670b271..1ed9004eb5a 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -321,10 +321,6 @@ void ValueEnumerator::EnumerateValue(const Value *V) { if (const Constant *C = dyn_cast(V)) { if (isa(C)) { // Initializers for globals are handled explicitly elsewhere. - } else if (isa(C) && cast(C)->isString()) { - // Do not enumerate the initializers for an array of simple characters. - // The initializers just pollute the value table, and we emit the strings - // specially. } else if (C->getNumOperands()) { // If a constant has operands, enumerate them. This makes sure that if a // constant has uses (for example an array of const ints), that they are -- cgit v1.2.3