From 0ecef88cb167dbd19023a932e7abac09059c3e4e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 Mar 2023 11:45:27 +0100 Subject: [PATCH] [GlobalOpt] Use more specific type (NFC) SRA always works on GlobalVariables. --- llvm/lib/Transforms/IPO/GlobalOpt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index 25dc748..d1e4203 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -349,7 +349,7 @@ struct GlobalPart { /// Look at all uses of the global and determine which (offset, type) pairs it /// can be split into. static bool collectSRATypes(DenseMap &Parts, - GlobalValue *GV, const DataLayout &DL) { + GlobalVariable *GV, const DataLayout &DL) { SmallVector Worklist; SmallPtrSet Visited; auto AppendUses = [&](Value *V) { -- 2.7.4