summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
index 88b05aab8db4..b462803bad38 100644
--- a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
+++ b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
@@ -101,21 +101,20 @@ bool llvm::isAllocaPromotable(const AllocaInst *AI) {
namespace {
-static DPValue *createDebugValue(DIBuilder &DIB, Value *NewValue,
- DILocalVariable *Variable,
- DIExpression *Expression, const DILocation *DI,
- DPValue *InsertBefore) {
+static void createDebugValue(DIBuilder &DIB, Value *NewValue,
+ DILocalVariable *Variable,
+ DIExpression *Expression, const DILocation *DI,
+ DPValue *InsertBefore) {
+ // FIXME: Merge these two functions now that DIBuilder supports DPValues.
+ // We neeed the API to accept DPValues as an insert point for that to work.
(void)DIB;
- return DPValue::createDPValue(NewValue, Variable, Expression, DI,
- *InsertBefore);
+ DPValue::createDPValue(NewValue, Variable, Expression, DI, *InsertBefore);
}
-static DbgValueInst *createDebugValue(DIBuilder &DIB, Value *NewValue,
- DILocalVariable *Variable,
- DIExpression *Expression,
- const DILocation *DI,
- Instruction *InsertBefore) {
- return static_cast<DbgValueInst *>(DIB.insertDbgValueIntrinsic(
- NewValue, Variable, Expression, DI, InsertBefore));
+static void createDebugValue(DIBuilder &DIB, Value *NewValue,
+ DILocalVariable *Variable,
+ DIExpression *Expression, const DILocation *DI,
+ Instruction *InsertBefore) {
+ DIB.insertDbgValueIntrinsic(NewValue, Variable, Expression, DI, InsertBefore);
}
/// Helper for updating assignment tracking debug info when promoting allocas.