mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Don't bother with sprintf, just pass the Twine through.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94684 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -29,7 +29,6 @@
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
#include "llvm/Transforms/Utils/Cloning.h"
|
||||
#include "llvm/Transforms/Utils/Local.h"
|
||||
#include <cstdio>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
@ -204,15 +203,12 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, LoopInfo* LI, LPPassManager* LPM)
|
||||
Latches.push_back(LatchBlock);
|
||||
|
||||
for (unsigned It = 1; It != Count; ++It) {
|
||||
char SuffixBuffer[100];
|
||||
sprintf(SuffixBuffer, ".%d", It);
|
||||
|
||||
std::vector<BasicBlock*> NewBlocks;
|
||||
|
||||
for (std::vector<BasicBlock*>::iterator BB = LoopBlocks.begin(),
|
||||
E = LoopBlocks.end(); BB != E; ++BB) {
|
||||
ValueMapTy ValueMap;
|
||||
BasicBlock *New = CloneBasicBlock(*BB, ValueMap, SuffixBuffer);
|
||||
BasicBlock *New = CloneBasicBlock(*BB, ValueMap, "." + Twine(It));
|
||||
Header->getParent()->getBasicBlockList().push_back(New);
|
||||
|
||||
// Loop over all of the PHI nodes in the block, changing them to use the
|
||||
|
Reference in New Issue
Block a user