[WebAssembly] Fix hasAddr64 being used before being initializer.
authorDan Gohman <dan433584@gmail.com>
Wed, 23 Sep 2015 16:59:10 +0000 (16:59 +0000)
committerDan Gohman <dan433584@gmail.com>
Wed, 23 Sep 2015 16:59:10 +0000 (16:59 +0000)
commit44f9959a95245c1d626dc87654544fdddde2b3e8
tree5396b225733cc7b6af4d72d2ca1db7452a36595a
parentd03868bb86e3091612f81d4123dc00970f9f8286
[WebAssembly] Fix hasAddr64 being used before being initializer.

This reverts r248388 and fixes the underlying bug: hasAddr64 was initialized
in runOnMachineFunction, but runOnMachineFunction isn't ever called in
CodeGen/WebAssembly/global.ll since that testcase has no functions. The fix
here is to use AsmPrinter's getPointerSize() as needed to determine the
pointer size instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248394 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp