summaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/DemoteRegToStack.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/DemoteRegToStack.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp b/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
index 7995b7540803..239fcb9d8f15 100644
--- a/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
+++ b/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
@@ -134,7 +134,7 @@ AllocaInst *llvm::DemotePHIToStack(PHINode *P, std::optional<BasicBlock::iterato
return nullptr;
}
- const DataLayout &DL = P->getModule()->getDataLayout();
+ const DataLayout &DL = P->getDataLayout();
// Create a stack slot to hold the value.
AllocaInst *Slot;