From 33dfebdcfa2f1e74f7881cba810478273f21ed33 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 16 Sep 2015 23:59:57 +0000 Subject: [PATCH] Try to fix WebAssembly build after r247864 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247870 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp | 2 +- lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp index 95cf00819f4..18e2e5057db 100644 --- a/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp +++ b/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp @@ -107,7 +107,7 @@ public: } // end anonymous namespace TargetIRAnalysis WebAssemblyTargetMachine::getTargetIRAnalysis() { - return TargetIRAnalysis([this](Function &F) { + return TargetIRAnalysis([this](const Function &F) { return TargetTransformInfo(WebAssemblyTTIImpl(this, F)); }); } diff --git a/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h b/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h index f2158ca0dfc..84f9f0e3e55 100644 --- a/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h +++ b/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h @@ -38,7 +38,7 @@ class WebAssemblyTTIImpl final : public BasicTTIImplBase { const WebAssemblyTargetLowering *getTLI() const { return TLI; } public: - WebAssemblyTTIImpl(const WebAssemblyTargetMachine *TM, Function &F) + WebAssemblyTTIImpl(const WebAssemblyTargetMachine *TM, const Function &F) : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)), TLI(ST->getTargetLowering()) {} -- 2.34.1