This patch makes the behavior of clang consistent with the behavior of gcc 4.6 in...
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 13 Nov 2012 15:32:35 +0000 (15:32 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 13 Nov 2012 15:32:35 +0000 (15:32 +0000)
commit76db2907b0d01913823db7de4653eb9db84b3013
tree3c931463b4236750c2287a12cbc3f0d150937315
parent4fa2bd8c7ac0b283c233baa81c202a0bc5fca451
This patch makes the behavior of clang consistent with the behavior of gcc 4.6 in cases where both -fPIC and -fPIE is used.

- Separately check if -fPIE was specified in the command line and define both __PIC__ and __PIE__ when -fPIE is used. We need to check this separately because -fPIE will infer -fPIC even if its not explicitly used.
- Fixed existing tests.
- Added new tests for cases where both -fPIC and -fPIE is used.

Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
Fixes: PR13221
Review: http://llvm-reviews.chandlerc.com/D94
llvm-svn: 167846
clang/lib/Driver/Tools.cpp
clang/test/Driver/pic.c