Try to fix WebAssembly build after r247864
authorHans Wennborg <hans@hanshq.net>
Wed, 16 Sep 2015 23:59:57 +0000 (23:59 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 16 Sep 2015 23:59:57 +0000 (23:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247870 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h

index 95cf00819f4aa80464924d5309be0d57156d8914..18e2e5057db55a9556fc70f2757fc7c6a159815f 100644 (file)
@@ -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));
   });
 }
index f2158ca0dfc3af7cac145099b92e5fad9618e32d..84f9f0e3e55e736beb819903620792fd4ad025f3 100644 (file)
@@ -38,7 +38,7 @@ class WebAssemblyTTIImpl final : public BasicTTIImplBase<WebAssemblyTTIImpl> {
   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()) {}