Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(835)

Unified Diff: lib/Transforms/NaCl/ConstantInsertExtractElementIndex.cpp

Issue 1151093004: Changes from 3.7 merge to files not in upstream (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/Transforms/NaCl/ConstantInsertExtractElementIndex.cpp
diff --git a/lib/Transforms/NaCl/ConstantInsertExtractElementIndex.cpp b/lib/Transforms/NaCl/ConstantInsertExtractElementIndex.cpp
index 50d896c5ef7086df139122b54b79284aed3d9bc0..743cada622337aa8cf72a98237e115e5e089eab9 100644
--- a/lib/Transforms/NaCl/ConstantInsertExtractElementIndex.cpp
+++ b/lib/Transforms/NaCl/ConstantInsertExtractElementIndex.cpp
@@ -34,10 +34,6 @@ public:
initializeConstantInsertExtractElementIndexPass(
*PassRegistry::getPassRegistry());
}
- void getAnalysisUsage(AnalysisUsage &AU) const override {
- AU.addRequired<DataLayoutPass>();
- BasicBlockPass::getAnalysisUsage(AU);
- }
using BasicBlockPass::doInitialization;
bool doInitialization(Module &Mod) override {
M = &Mod;
@@ -162,7 +158,7 @@ void ConstantInsertExtractElementIndex::fixNonConstantVectorIndices(
bool ConstantInsertExtractElementIndex::runOnBasicBlock(BasicBlock &BB) {
bool Changed = false;
if (!DL)
- DL = &getAnalysis<DataLayoutPass>().getDataLayout();
+ DL = &BB.getParent()->getParent()->getDataLayout();
jvoung (off chromium) 2015/05/26 20:39:45 nit: Could be BB.getModule()->getDataLayout();
Derek Schuff 2015/05/26 22:01:32 Done.
Instructions OutOfRangeConstantIndices;
Instructions NonConstantVectorIndices;

Powered by Google App Engine
This is Rietveld 408576698