diff options
author | Frederic Riss <friss@apple.com> | 2014-12-09 18:57:34 +0000 |
---|---|---|
committer | Frederic Riss <friss@apple.com> | 2014-12-09 18:57:34 +0000 |
commit | ff58fd207eb16189c6751fa4d8aed230a4b045b3 (patch) | |
tree | 1dfbf9b20fd5802cd5bfac23c94dd997bf3074a7 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | 996019dd289b8b2f3fb4d1df7c1c8373754a76ca (diff) | |
download | llvm-ff58fd207eb16189c6751fa4d8aed230a4b045b3.zip llvm-ff58fd207eb16189c6751fa4d8aed230a4b045b3.tar.gz llvm-ff58fd207eb16189c6751fa4d8aed230a4b045b3.tar.bz2 |
Reorder the code to avoid inserting at the beginning of a vector.
As per dblaikie suggestion, thanks\!
llvm-svn: 223808
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 5decfe5..13838ba 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1120,12 +1120,12 @@ bool llvm::replaceDbgDeclareForAlloca(AllocaInst *AI, Value *NewAllocaAddress, // will take a value storing address of the memory for variable, not // alloca itself. SmallVector<int64_t, 4> NewDIExpr; + NewDIExpr.push_back(dwarf::DW_OP_deref); if (DIExpr) { for (unsigned i = 0, n = DIExpr.getNumElements(); i < n; ++i) { NewDIExpr.push_back(DIExpr.getElement(i)); } } - NewDIExpr.insert(NewDIExpr.begin(), dwarf::DW_OP_deref); // Insert llvm.dbg.declare in the same basic block as the original alloca, // and remove old llvm.dbg.declare. |