aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-31 18:51:41 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-31 18:51:41 +0000
commit058d3deab8924e3e1946b964745d9f0a30fd302b (patch)
treec03693eb93aa3b07cae4f8ad8526ce0f7db75df1 /llvm/lib/CodeGen/MachineFunction.cpp
parente866c41f5c2f3ec7455756e4362d878866e677dd (diff)
downloadllvm-058d3deab8924e3e1946b964745d9f0a30fd302b.zip
llvm-058d3deab8924e3e1946b964745d9f0a30fd302b.tar.gz
llvm-058d3deab8924e3e1946b964745d9f0a30fd302b.tar.bz2
Implement reasonable conversion ranking for Objective-C pointer
conversions (<rdar://problem/8592139>) for overload resolution. The conversion ranking mirrors C++'s conversion ranking fairly closely, except that we use a same pseudo-subtyping relationship employed by Objective-C pointer assignment rather than simple checking derived-to-base conversions. This change covers: - Conversions to pointers to a specific object type are better than conversions to 'id', 'Class', qualified 'id', or qualified 'Class' (note: GCC doesn't perform this ranking, but it matches C++'s rules for ranking conversions to void*). - Conversions to qualified 'id' or qualified 'Class' are better than conversions to 'id' or 'Class', respectively. - When two conversion sequences convert to the same type, rank the conversions based on the relationship between the types we're converting from. - When two conversion sequences convert from the same non-id, non-Class type, rank the conversions based on the relationship of the types we're converting to. (note: GCC allows this ranking even when converting from 'id', which is extremeley dangerous). llvm-svn: 124591
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions