Daniel Dunbar
bcd554f908
Driver: Fix clang -ccc-no-clang -x c++-header foo.h on Darwin.
...
llvm-svn: 95876
2010-02-11 17:33:45 +00:00
Daniel Dunbar
aeea8ac3d8
Driver: Add -rewrite-objc, which is an interface to clang -cc1 -rewrite-objc.
...
llvm-svn: 95849
2010-02-11 03:16:21 +00:00
Daniel Dunbar
84f22f9da1
Driver: Fix infinite loop and wrong message on invalid -ccc-clang-arch argument.
...
llvm-svn: 95848
2010-02-11 03:16:07 +00:00
Daniel Dunbar
3241d400c8
Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
...
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.
llvm-svn: 95787
2010-02-10 18:49:11 +00:00
Anders Carlsson
fcd764a168
Add support for threadsafe statics, and make them the default (matching gcc).
...
Daniel, I'd appreciate a review of the driver/cc1 parts.
llvm-svn: 95508
2010-02-06 23:23:06 +00:00
Ted Kremenek
2f2692f8ca
Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.
...
llvm-svn: 95348
2010-02-05 02:06:54 +00:00
Ted Kremenek
b6e400c87c
Rename -cc1 option '-warn-objc-missing-dealloc' to '-analyzer-check-objc-missing-dealloc'.
...
llvm-svn: 95347
2010-02-05 01:59:21 +00:00
Ted Kremenek
61b506aa8f
Rename -cc1 option '-warn-objc-methodsigs' to '-analyzer-check-objc-methodsigs'.
...
llvm-svn: 95346
2010-02-05 01:57:44 +00:00
Ted Kremenek
2d8ef71ae6
Rename -cc1 option '-warn-objc-unused-ivars' to '-analyzer-check-objc-unused-ivars'.
...
llvm-svn: 95345
2010-02-05 01:55:01 +00:00
Ted Kremenek
d519b83757
Rename -cc1 option '-warn-dead-stores' to '-analyzer-check-dead-stores'.
...
llvm-svn: 95343
2010-02-05 01:52:40 +00:00
Ted Kremenek
ec5b3d45c1
Rename -cc1 option '-warn-security-syntactic' to '-analyzer-check-security-syntactic'.
...
llvm-svn: 95342
2010-02-05 01:50:36 +00:00
Daniel Dunbar
c434394d18
Driver: Add -[no-]integrated-as for clang.
...
- Requires backend support, which only exists for i386--darwin currently.
No 'as' required:
--
ddunbar@ozzy:tmp$ cat t.c
int main() { return 42; }
ddunbar@ozzy:tmp$ clang -m32 -integrated-as t.c
ddunbar@ozzy:tmp$ ./a.out; echo $?
42
ddunbar@ozzy:tmp$
--
The random extra whitespace is how you know its working! :)
llvm-svn: 95194
2010-02-03 03:07:56 +00:00
Daniel Dunbar
ffa70e8b27
Driver/Darwin: Don't error/warn on conflicting deployment targets. Apparently
...
this is still a popular thing to do.
llvm-svn: 95093
2010-02-02 17:31:12 +00:00
Daniel Dunbar
98188414ef
Driver/Darwin: Darwin uses -fobjc-legacy-dispatch on ARM.
...
llvm-svn: 95006
2010-02-01 21:07:43 +00:00
Daniel Dunbar
2e3f2c805e
Driver/Frontend: Add support for -fobjc-legacy-dispatch, not yet used.
...
llvm-svn: 95004
2010-02-01 21:07:25 +00:00
Daniel Dunbar
8fa74aa21d
Simplify.
...
llvm-svn: 94929
2010-01-30 23:31:57 +00:00
Benjamin Kramer
842bf17366
Use StringRef instead of returning a temporary std::string.
...
This fixes a really nasty bug in Darwin::getDarwinArchName where we were going
StringRef -> temporary std::string -> StringRef (and return the dead StringRef).
The StringRefs from Triple live as long as the Triple itself, that should be
long enough.
Hopefully 2 of 4 MSVC buildbot failures are gone now.
llvm-svn: 94892
2010-01-30 15:01:47 +00:00
Daniel Dunbar
1299819f71
Driver: Don't honor -std-default for C++, this makes it hard to run the gdb test
...
suite with clang++ enabled.
The right fix here is PR6175, although we would still have to find a different
work around for the gdb test suite.
llvm-svn: 94838
2010-01-29 21:03:02 +00:00
Daniel Dunbar
6596984f3c
Driver/Darwin: Fix a crash when diagnosing conflicting deployment targets.
...
llvm-svn: 94812
2010-01-29 17:02:25 +00:00
Douglas Gregor
ac0605e927
Introduce serialization and deserialization of diagnostic information
...
so that CIndex can report diagnostics through the normal mechanisms
even when executing Clang in a separate process. This applies both
when performing code completion and when using ASTs as an intermediary
for clang_createTranslationUnitFromSourceFile().
The serialized format is not perfect at the moment, because it does
not encapsulate macro-instantiation information. Instead, it maps all
source locations back to the instantiation location. However, it does
maintain source-range and fix-it information. To get perfect fidelity
from the serialized format would require serializing a large chunk of
the source manager; at present, it isn't clear if this code will live
long enough for that to matter.
llvm-svn: 94740
2010-01-28 06:00:51 +00:00
Daniel Dunbar
f48d51d693
Driver/Darwin: Eliminate invalid uses of DarwinVersion -- this fixes a number of
...
defaults when targetting iPhoneOS (blocks, non-fragile ABI, stack protector).
llvm-svn: 94642
2010-01-27 00:57:11 +00:00
Daniel Dunbar
6d23b2f503
Driver/Darwin: Simplify target version checks.
...
llvm-svn: 94641
2010-01-27 00:57:03 +00:00
Daniel Dunbar
8360803a8a
Driver/Darwin: Fix a few link arguments when targetting different iPhoneOS
...
versions to match gcc (which is matching linker changes).
llvm-svn: 94640
2010-01-27 00:56:56 +00:00
Daniel Dunbar
b73bb5d085
Driver/Darwin: Switch clang -triple synthesis to use computed target information.
...
llvm-svn: 94639
2010-01-27 00:56:49 +00:00
Daniel Dunbar
7c870175eb
Driver/Darwin: Eliminate confusing IsIPhoneOS parameter -- this was actually
...
just indicating whether the default target should be iPhoneOS.
llvm-svn: 94638
2010-01-27 00:56:44 +00:00
Daniel Dunbar
15c8942baf
Driver/Darwin: Switch to using isTargetIPhoneOS where appropriate.
...
llvm-svn: 94637
2010-01-27 00:56:37 +00:00
Daniel Dunbar
3b8e50d0ed
Driver/Darwin: Track target platform more explicitly in tool chain, eventually
...
this should just be part of the tool chain itself once we have eliminated
argument translation.
llvm-svn: 94635
2010-01-27 00:56:25 +00:00
Daniel Dunbar
19afd61201
Simplify.
...
llvm-svn: 94503
2010-01-26 03:56:40 +00:00
Daniel Dunbar
d54669d30b
Driver/Darwin: Honor IPHONEOS_DEPLOYMENT_TARGET.
...
llvm-svn: 94488
2010-01-26 01:45:19 +00:00
Daniel Dunbar
d86666ffd7
Driver/Darwin: Stuff iPhoneOS into environment portion of the (llvm/clang) triple instead of keying off architecture. Also, fix version define to properly include the revision/micro component of the version number.
...
llvm-svn: 94487
2010-01-26 01:44:04 +00:00
Daniel Dunbar
4e29505a95
Driver: Fix fallback to gcc to -c instead of -S if trying to generate an LLVM bc
...
file.
llvm-svn: 94463
2010-01-25 22:35:08 +00:00
Daniel Dunbar
fcf2d428e4
ASTUnit: Don't check that input files exist when parsing ASTs from the command
...
line -- they may be remapped (fake) files. This is useful for testing parsing
entirely from memory.
llvm-svn: 94395
2010-01-25 00:44:02 +00:00
Chris Lattner
0bcc858a2b
-fno-rtti is now the default.
...
llvm-svn: 94379
2010-01-24 20:43:31 +00:00
Ted Kremenek
4c0df3dc1d
Rename getClangFullVendorVersion() to getClangFullVersion().
...
llvm-svn: 94273
2010-01-23 02:11:34 +00:00
Ted Kremenek
51b8bc93f8
Move version string generation (e.g., "clang 1.1 ...") to libBasic/Version.cpp, getClangFullVendorVersion().
...
llvm-svn: 94235
2010-01-22 22:29:50 +00:00
Ted Kremenek
18e066f6a9
(1) Rename getClangSubversionRevision() to getClangRevision(), and
...
have it return a StringRef instead of an integer (to be more VCS
agnostic).
(2) Add getClangFullRepositoryVersion(), which contains an
amalgamation of the repository name and the revision.
(3) Change PCH to only emit the string returned by
getClangFullRepositoryVersion() instead of also emitting the value
of getClangSubversionRevision() (which has been removed). This is
functionally equivalent.
More cleanup to version string generation pending...
llvm-svn: 94231
2010-01-22 22:12:47 +00:00
Ted Kremenek
2377a0e0ea
Rename getClangSubversionPath() -> getClangRepositoryPath() and have it return a StringRef.
...
llvm-svn: 94213
2010-01-22 20:55:35 +00:00
Daniel Dunbar
7cde09ac8a
Driver/Darwin: Update tool chain to use static clang_rt libraries provided by
...
compiler-rt. This tool chain now works on x86 and ARM, but isn't the x86 default
yet.
This drastically cleans up the linker invocation, old invocation:
--
"/Developer/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-weak_reference_mismatches" "non-weak" "-o" "a.out" "-lcrt1.10.6.o" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.." "t.o" "-lSystem" "-lgcc"
--
New invocation:
--
# For 10.6:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-o" "a.out" "-lcrt1.10.6.o" "t.o" "-lSystem"
# For 10.4:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.4" "-o" "a.out" "-lcrt1.o" "t.o" "-lSystem" "-lgcc_s.10.4" "/Volumes/Data/ddunbar/llvm.obj.64/Debug/lib/clang/1.1/lib/darwin/libclang_rt.10.4.a"
--
llvm-svn: 94150
2010-01-22 03:38:14 +00:00
Daniel Dunbar
93d7acfcf2
Driver/Darwin/ld: Fix refacto, -force_cpusubtype_ALL should only be forwarded,
...
not always added.
llvm-svn: 94149
2010-01-22 03:37:33 +00:00
Daniel Dunbar
dcc3b657f2
Driver/Darwin/ld: Factor out getDarwinArchName, for getting the "Darwin" arch
...
name being used in an driver invocation.
llvm-svn: 94139
2010-01-22 02:04:58 +00:00
Daniel Dunbar
a48823fdbe
Driver/Darwin/ld: Eliminate AddDarwinSubArch, our linker invocation is going to
...
diverge from gcc anyway.
llvm-svn: 94138
2010-01-22 02:04:52 +00:00
Daniel Dunbar
3f3e2cd820
Driver: Lift clang resource directory computation to the Driver object.
...
llvm-svn: 93971
2010-01-20 02:35:16 +00:00
Ted Kremenek
bb1110a7ae
Fix possible memory leak by using an OwningPtr.
...
llvm-svn: 93834
2010-01-19 01:29:05 +00:00
Daniel Dunbar
6bc5be24fa
Remove ../libexec from clang program search path, clang-cc is dead.
...
llvm-svn: 93749
2010-01-18 19:16:53 +00:00
Daniel Dunbar
620327d66b
Fix a FIXME.
...
llvm-svn: 93087
2010-01-10 00:46:10 +00:00
Daniel Dunbar
1c4788b66b
Darwin/ld: Don't pass '-weak_reference_mismatches non-weak' when
...
-weak_reference_mismatches is not present, it is the default.
llvm-svn: 93086
2010-01-10 00:46:00 +00:00
Chris Lattner
e23003d1f1
implement -ftabstop=width, patch by Christian Adåker
...
llvm-svn: 93078
2010-01-09 21:54:33 +00:00
Dan Gohman
d1e76b957b
Use -fno-math-errno by default, and remove the IsMathErrnoDefault
...
targethook, which is no longer being used. This fixes PR5971.
llvm-svn: 92987
2010-01-08 02:20:44 +00:00
Nate Begeman
0e1a625fe4
Allow clang to pass -x cl through to compiler driver.
...
llvm-svn: 92686
2010-01-05 06:00:15 +00:00
Benjamin Kramer
d20ef75b91
Remove some dead variables clang-analyzer found.
...
llvm-svn: 92162
2009-12-25 15:43:36 +00:00