summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-07-24 16:25:13 +0000
committerMark Seaborn <mseaborn@chromium.org>2013-07-24 16:25:13 +0000
commit21fe45076c371e9a9f27e15c4e068e77a185fe62 (patch)
tree461c6162cb1f9262f1af80be1cd94a7e65847dc1 /lib/CodeGen/CGExpr.cpp
parent4c7736ec76fb35fe83eb4144137cf14df1c6d056 (diff)
downloadclang-21fe45076c371e9a9f27e15c4e068e77a185fe62.tar.gz
clang-21fe45076c371e9a9f27e15c4e068e77a185fe62.tar.bz2
clang-21fe45076c371e9a9f27e15c4e068e77a185fe62.tar.xz
Use ARM-style representation for C++ method pointers under PNaCl/Emscripten
Before this change, Clang uses the x86 representation for C++ method pointers when generating code for PNaCl. However, the resulting code will assume that function pointers are 0 mod 2. This assumption is not safe for PNaCl, where function pointers could have any value (especially in future sandboxing models). So, switch to using the ARM representation for PNaCl code, which makes no assumptions about the alignment of function pointers. Since we're changing the "le32" target, this change also applies to Emscripten. The change is beneficial for Emscripten too. Emscripten has a workaround to make function pointers 0 mod 2. This change would allow the workaround to be removed. See: https://code.google.com/p/nativeclient/issues/detail?id=3450 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
0 files changed, 0 insertions, 0 deletions