mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149800 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -820,7 +820,8 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
|
||||
// Don't forward functions which are external in the test module too.
|
||||
if (TestFn && !TestFn->isDeclaration()) {
|
||||
// 1. Add a string constant with its name to the global file
|
||||
Constant *InitArray = ConstantArray::get(F->getContext(), F->getName());
|
||||
Constant *InitArray =
|
||||
ConstantDataArray::getString(F->getContext(), F->getName());
|
||||
GlobalVariable *funcName =
|
||||
new GlobalVariable(*Safe, InitArray->getType(), true /*isConstant*/,
|
||||
GlobalValue::InternalLinkage, InitArray,
|
||||
|
Reference in New Issue
Block a user